Cool! Several handy one-liners for use in Sed, the stream editor.
# 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)
sed ‘n;d’
i’ve been looking for your mail, can you contact me, please?
Hi.
I wanted to let you know that I wrote an article “Famous Sed One-Liners Explained” which explains all the sed one-liners in that file.
Hope you find it useful! 🙂
Sincerely,
Peteris Krumins