[Cialug] grep(1)
Cesar Mendoza
paks at kitiara.org
Tue Jan 26 16:51:11 CST 2010
What the option '-l' means is that once a file matches your string, it will
print the name of the file and stop scanning that file for more matches.
Then it will go and scan the next file.
On Tue, Jan 26, 2010 at 4:32 PM, Todd Walton <tdwalton at gmail.com> wrote:
> gnu grep(1) 2.5.1-cvs says:
>
> -l, --files-with-matches
> Suppress normal output; instead print the name of each input
> file from which output would
> normally have been printed. The scanning will stop on the
> first match. (-l is specified by
> POSIX.)
>
> So when I do 'grep string *.txt' am I going to get back every file
> that has string in it? Or is it literally going to stop on the first
> match?
>
> It returns every file. It stops searching each particular file on the
> first match, and then moves on to the next file. It's ambiguous
> wording.
>
> --
> Todd
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20100126/e4fd3248/attachment-0001.htm
More information about the Cialug
mailing list