Below are one liners to clean out all comment and blank lines with grep and sed, usually in config files.
grep -v "^#\|^$" <conf_file>
or
grep -v "^\#" <conf_file> | sed '/^$/d'
Clean up config files
Submitted by sandip on Tue, 10/12/2010 - 21:53
Below are one liners to clean out all comment and blank lines with grep and sed, usually in config files. grep -v "^#\|^$" <conf_file> or grep -v "^\#" <conf_file> | sed '/^$/d' »
|
See AlsoUser loginRecent blog posts
Who's onlineThere are currently 0 users and 9 guests online.
|