[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GREP



Damian Menscher wrote:
> 
> On Fri, 20 Oct 2000, Erik Steffl wrote:
> 
> >   the main difference is a sideeffect, sort of, if grep is called for
> > with one file as an argument it only prints the line matched, not the
> > filename, so you get bunch of lines (each successfull match) but you
> > have no idea which files these lines are in...
> >
> >   and probably some other more or less dirty tricks...
>                                     ^^^^^^^^^^
> 
> Look in the grep manpage for the -l option  ;)

  but then you get only the filename, not the line(s) matched, I have
found out that I usually prefer (find most usable) the way grep works
when it has more then one file (filename:line), so I use that as a
default (of course, if only one file is found by find you still don't
see filename in grep's output even when using xargs:-)

	erik



Reply to: