Admins eHow SysAdmin Tips & Tricks

June 22, 2009

Remove comments and empty lines on linux using sed command

Filed under: CentOS,Debian,General — Tags: , , , , — admin @ 10:24 am
sed -e 's/#.*//' -e 's/[ ^I]*$//' -e '/^$/ d' filename

Powered by WordPress