Skip to main content
3 of 9
added 63 characters in body

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 6 

and I need to sed from 1 4 include 1 but not include 5 and bellow but if file contains no 5 it could sed till end of file