Thursday, February 6, 2014

Conf File Clean Up

Quick method to remove all comments and empty lines from a conf file.


# grep -v "^#" /etc/example.conf | sed -e '/^$/d'

or

# cat /etc/example.conf | sed '/ *#/d; /^ *$/d'



No comments: