Sed : print all lines after match

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="

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)