Mukul Singh wrote:
cat <filename> | egrep -v "^[[:space:]]*$|^#"
David C. Rankin wrote:
...
sed -e '/^[/s]*$/d' -e '/^\s*[#;]/d' <$1
...
Great commands! Into my toolbox! Just what I was wanting to do on Monday .... To be fecescious, and keeping the nitty-gritty (so no one will quickly fathom what is going to happen in an IP-tables rules script or other config files for instance), just call/run such a comment free shell script at startup, e.g. ncIPrules.sh. ( Do sed -e '/^[/s]*$/d' -e '/^\s*[#;]/d' iprules.sh>ncIPrules.sh and then add ' up "/bin/bash /etc/scripts/ncIPrules.sh" ' in a firewall config file that is loaded before the rules are loaded into the kernel). :-) Al -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org