Click to See Complete Forum and Search --> : sed: Delete matched line and following


bubblenut
10-29-2003, 07:22 AM
Hi,

How do I delete the matched line and the following line with sed I have the following script.

for file in $(ls *.tpl)
do
sed "s/This line to delete//g" $file > buffer
mv buffer $file
done

but this will only delete the text. It will not delete the line break or the next line.
Thanks in advance
Bubble