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:

  1. how to search search & delete line in vi editor the below command in vi editor will remove the whole...
  2. Kill Multiple Processes or PID on FreeBSD Sometime I have problem killing all apache processes or PID...
  3. Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...

Leave a Reply