Skip to main content
2 of 9
added 24 characters in body
Stéphane Chazelas
  • 586.2k
  • 96
  • 1.1k
  • 1.7k

sed lines after match and before next match

how to get all lines after matching word till next different matching word? For example

1 2 3 4 5 

and I need to sed from 1 4 include 1 but not include 5 and bellow