hello,
i have a need for something that will cat a large file, grep it for a
word and have the ability to pull the 5 lines before and after (more
like 3 lines before and 8 lines after) the grep has found the word and
display the results. example:

cat <file>|grep 5|??? 2
<file>
1
2
3
4
5
6
7
8
9
10
</file>

output = 3
         4
         5 <-- being the greped word and pulling the 2 lines before and
after
         6
         7

can this be done??

thank you

eric



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to