Sed One Liners

(via sed.sourceforge.net)

Very useful sed one liners...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Sed one-liners explained

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 the file sed1line.txt which is floating around the internet.

Hope you find it useful! :)

Sincerely,
Peteris Krumins

Remove all empty lines in a text file

$ sed '/^$/d' file > file.new

Post new comment

  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Comment