[2013-03-20] sed 101

remove all lines where somestring does not occour:

sed -i -n '/somestring/p' file

keep only lines wehere stringa or stringb occours:

sed -i -n -e '/stringa/p' -e '/stringb/p' file

remove all lines with somestring:

sed -i '/somestring/d' file