2009/8/20 Craig Ayliffe <[email protected]>:
> egrep -v "^#" /etc/sysconfig/iptables-config >
> /etc/sysconfig/iptables-config_tmp

A bit nicer way - to get rid of empty lines as well, is:

egrep -v '^(#|$)' /etc/sysconfig/iptables-config

Or:

egrep -v "^#" /etc/sysconfig/iptables-config | cat -s

to remove multiple blank lines from output. "| less -s" will get the
same effect.

Cheers,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to