[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text Manipulation



Randy wrote:
> There is probbly an easier way to do this... But here is one way.
> You could do something simple in perl like this:
> while (<>) { s/(\w\w\w\w\w\w\w)/$1 /g; print; }

Right track, Randy. KISS to those other wannabe-JAPHs.
   perl -pi -e 's/(.{7})/$1 /g' FILENAME

This breaks up each line into 7-character "words". In place. Does not work on 
Microsoft OSes due to lame filesystem implementation.
It does not treat the file as one continuous string (although that could be 
done).

Mike808/
-- 
() Join the ASCII ribbon campaign against HTML email and Microsoft-specific
/\ attachments. If I wanted to read HTML, I would have visited your website!
Support open standards.


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.