diplay all lines before a match is found
Hi all,
my problem is as follow...
I have a file, and I have to display all the lines from the beginning of the file till a matching string is found.
I know grep with "-a", "-b" as option does exist, but it needs the number of lines to be printed in advance.
eg grep -b 10 "search_string" file
so it will print 10 lines before a match is found.
|