Sed In One Line
FILE SPACING: # double space a file sed G # double space a file which already has blank lines in it. Output file # should contain no more than one blank line between lines of text. sed '/^$/d;G' # triple space a file sed 'G;G' # undo double-spacing (assumes even-numbered lines are always blank) [...]
Awk In One Line
HANDY ONE-LINERS FOR AWK 22 July 2003 compiled by Eric Pement [...]