Remove empty lines with sed from a configuration

If you want to remove all empty lines from a config file, you can use sed on unix system. Use with the regular expression:

sed ‚/^$/d/‘ config-file > new-file

Source:

http://www.cornerstonemag.com/sed/


Leave a Reply