grep awk strip empty commented lines

Strip out empty or commented code.

grep -e "^[^#]" /etc/file.conf

awk '{ if ($0 !~ /^[#]|^$/) print $0 ;}' /etc/file.conf

Posted in Bash by texilee at July 9th, 2007.

Leave a Reply