> I hope you can help me with my problem. I got up to this point point -
> C:\grepsb80\grep32.exe "search word" C:\grepsb80\myfile.txt >
> C:\grepsb80\result.txt , what do i need to add if i want to get 3 lines from
> the top and 3 lines from the bottom of my keyword ?

$ grep --help
...
Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context=NUM         print NUM lines of output context
  -NUM                      same as --context=NUM
...

The manual pages (man grep) have a more detailed description of all of
grep's options.

Cheers,

TAA

-----------------------------------------------------
Tony Abou-Assaleh
Email:    [EMAIL PROTECTED]
Web site: http://tony.abou-assaleh.net
----------------------[THE END]----------------------



Reply via email to