I have a text file
$ cat a.txt
a_1
a_2
a_3
a_4
a_5
If I search for a_2, I need to get all elements after a_2 including it.
Output expected is
a_2
a_3
a_4
a_5
Kindly help.
I have a text file
$ cat a.txt
a_1
a_2
a_3
a_4
a_5
If I search for a_2, I need to get all elements after a_2 including it.
Output expected is
a_2
a_3
a_4
a_5
Kindly help.
Through sed,
$ sed -n '/a_2/,/&/p' file
a_2
a_3
a_4
a_5
Simplest way.
more +"a_2" file