I have a script where I was searching for a regular expression then grabbing the line right above it.
|awk '/regexpr/{print x};{x=$0}'
My input file has changed and now I need to grab just the 5th line above the regexpr. Any ideas?
For reference sake how do I grab the 5th line below the regexpr. Or say the first and second lines above/below the regexpr?
Thanks in advance
Dave
|awk '/regexpr/{print x};{x=$0}'
My input file has changed and now I need to grab just the 5th line above the regexpr. Any ideas?
For reference sake how do I grab the 5th line below the regexpr. Or say the first and second lines above/below the regexpr?
Thanks in advance
Dave