Sed print only the line that exists two lines after the match
Hello. I have this content in a file.
name: george
tag: genomes
ID: 455031
I want to get the line with the name by using sed/awk/grep.
I tried that command
sed -n '/455031/{g;1!p;};h' IDs.txt
which gave me the line with tag : genomes.
How can i make it to print only the line with name: george ?
Thank you.
|