folding arguments

David Canzi dmcanzi at watdcsu.waterloo.edu
Sun Feb 14 14:07:03 AEST 1988


In article <2091 at bsu-cs.UUCP> dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
>
>     $ find $DIR -print | nroff | sed -e 's/  */ /g' | ...
>
>Since nroff right-justifies by default, we use sed to squeeze multiple
>blanks to a single blank so "while read" in sh will work.  (Not
>tested.)

Instead of nroff, I used the fmt command, like so:

find $DIR -print | fmt -1021 | ...

The fmt command may be a Berkeleyism.  1021 is the maximum width that
fmt allows me to specify on the two systems (BSD4.3 and Sun 3.2) where
I tried this.

-- 
David Canzi



More information about the Comp.unix.wizards mailing list