Show ALL lines before a match
You can use large enough number for -B
option of grep. For example if your know that input size is no more than 999
you can use it with -B
option:
... | grep -B 999 -- "foo"
Show ALL lines before a match
You can use large enough number for -B
option of grep. For example if your know that input size is no more than 999
you can use it with -B
option:
... | grep -B 999 -- "foo"