AWK experts - how would I code around this in awk...
Steve Flynn
anothermindbomb at gmail.com
Fri Feb 19 11:17:34 UTC 2010
On Thu, Feb 18, 2010 at 10:39 PM, Alex Janssen <alex at ourwoods.org> wrote:
> Steve Flynn wrote:
> Maybe a bash script that removes all CR's and LF's and uses echo to
> reinsert them every 20 characters would do the job.
>
> #######script
> OLDFILE="whatever"
> NEWFILE="whatever-new"
> touch $NEWFILE
> while read -n20 LINE
> do
> echo "$LINE" >>$NEWFILE
> done <$(cat $OLDFILE|tr -d "\n\r")
> exit 0
> ###########end script
>
That's not a bad idea at all come to think of it.
Remove ALL CR/LF's to make one honking big line and then spit it back
out in chunks of 'n'.
Definitely food for thought. I can feel some playing around on my
laptop happening on the train home this afternoon... cheers! :)
--
Steve
When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
More information about the ubuntu-users
mailing list