Squeeze multiple blank lines to one

March 10th, 2007 toydi

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 [...]

Posted in cat, lpr, Text Manipulation, tr | Hits: 48849 | No Comments »

changing upper/lower case with tr

August 4th, 2006 mysurface

tr is actually a common translator, here I show you how to convert string from uppercase to lowercase echo “UPPER” | tr [A-Z] [a-z] from lower to upper echo “lower” | tr [a-z] [A-Z] [中文翻译] Related Postsmakes application hang less, changing the nice valueYou can run a program with different nice, by default is 0 [...]

Posted in Text Manipulation, tr | Hits: 37347 | 2 Comments »