[GLLUG] grep help

Staff Staff Staff at meridian.mi.us
Wed May 11 15:28:40 EDT 2005


Mike:

If I understand what you are trying to pull,

you might take a look at the -v flag on the grep.

running a:
grep -v File(s)

on your output will only leave the first line, and the last 3 lines...

the -v flag will invert the grep, and thus only pull lines that don't
include the text 'File(s)

Hope that helps

>>> Mike Szumlinski <szumlins at mac.com> 5/11/2005 3:10:28 PM >>>
Actually, almost there.  I also want the first line as well as the last

3 of each file.




More information about the linux-user mailing list