Re: In sed, how do you delete just the first matching line in a block of lines?
Dave S. wrote:
> Synopsis: I need to delete just the first line matching an expression
> in a range of lines in which multiple lines match the expression.
>
sed -e '
/switch/,/break/!b
/break/d
' yourfile
|