Hi,
I want to extract lines following matching pattern in a file with the matching line.
grep, sed will obviously give me only matching line and not lines following them.
Example
I want two lines follwing line which contain user1 and the matched line.
How it can be achieved?
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
I want to extract lines following matching pattern in a file with the matching line.
grep, sed will obviously give me only matching line and not lines following them.
Example
Code:
This is line1 - user1
This is line2 - user2
This is line3 - user3
How it can be achieved?
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.