perl -ne 'print unless /^\s*[;\$#]|^$/' dhcpd.conf

The benefit of the perl version is that it’s not just lines where the first character is a hash but even indented lines whos first character is a hash.



Published

12 October 2012

Category

regex

Tags