Skip to content

Instantly share code, notes, and snippets.

View Lonenso's full-sized avatar

Peter Lonenso

  • China XMN
  • 23:37 (UTC +08:00)
View GitHub Profile
@un33k
un33k / sed cheatsheet
Created August 22, 2011 13:28
magic of sed -- find and replace "text" in a string or a file
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'