Wednesday, October 28, 2009

A sed keeper...

For those of you who are shell scripters, you may find this one useful:

/bin/sed ':a;N;$!ba;s/\n\n\n*/\n\n/g'

This removes multiple blank spaces in a file and replaces them with only one blank space. There are other ways to do this, but this is one of them...


No comments: