sed with multiple criteria
sed -e 1d -e 50d -e ‘/junks/d’
would remove first and 50th line & any line(s) with the word “junks”.
update 20080821 :
sed -e ‘/^$/d’
would remove every empty line
Related posts:
- how to search search & delete line in vi editor the below command in vi editor will remove the whole...
- Kill Multiple Processes or PID on FreeBSD Sometime I have problem killing all apache processes or PID...
- Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...