Monday, February 21, 2011

Squeeze multiple blank lines to one

Documents like RFCs may contain many blank-line blocks.

To save the trees, i always squeeze multiple blank lines down to single blank line, before printing.

Once I did this manually (yes, it’s like hell), but now I use cat -s:

cat -s rfc2324.txt | tr -d '\\f' | lpr

I use tr -d to remove any form feed character, and lpr will submit the document for printing.

No comments:

Post a Comment