Afficher un message
Vieux 21/08/2006, 07h26   #6
Rakesh Sharma
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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

  Réponse avec citation
 
Page generated in 0,04942 seconds with 9 queries