Hi
looking for a single line command to search for line and print line immediately above
plus the second line, third line and fourth line above
awk '/search_for_string/{x=$0;next}{print x";"$0;}'
Thanks in advance
Mik
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.