To print all lines after, and including, the first match:
$ echo -ne 'apple\nbanana\ncherry\n' | sed -ne '/banana/,$ p'
banana
cherry
To print all lines after, and NOT including, the first match:
$ echo -ne 'apple\nbanana\ncherry\n' | sed -e '1,/banana/ d'
cherry
Filtering lines when pattern matches between “text=” and “status=” can be done with a simple grep
, no need for sed
and cut
:
$ grep 'text=.*pattern.* status="