Re: Need to delete the next line in a file
2006-08-17, 17:28(+00), Pawel Gancarz:
> heynetboy wrote:
>> I need to find a line in a file that starts with a % and then delete
>> the very next line leaving the line that starts with the %. I can find
>> the line by using ^% but no idea how the delete the next line.
>> Any ideas how to do this?
>
> sed '/^%/{n;d}'
sed '/^%/{n;d;}'
--
Stéphane
|