====== Delete a matching line ====== sed '/pattern/d' filename > newfile Or edit in place (GNU) sed -i '/pattern/d' filename
sed '/pattern/d' filename > newfile
sed -i '/pattern/d' filename