Re: Possible grep(1) bug or user error :)?
- From: Eygene Ryabinkin <rea-fbsd@xxxxxxxxxxx>
- Date: Sun, 18 Mar 2007 01:14:43 +0300
Garret,
Sat, Mar 17, 2007 at 02:47:43PM -0700, Garrett Cooper wrote:
I was recently grepping a directory and outputting to a file located in the
same directory as follows:
grep -ri {key} * > {key}.found
The thing is that grep kept on feeding off of the {key}.found file and
eventually ate up all the free space on the device (~12GB).
And what you expected? The file {key}.found was created prior to the
expansion of '*', so grep was parsing that file and feeding it with
the messages about the lines with {key} that were found. And these
lines also provoked grep to add more lines about the {key} found, and
so on. I think you got the idea of the infinite cycle you created.
--
Eygene
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Possible grep(1) bug or user error :)?
- From: Garrett Cooper
- Re: Possible grep(1) bug or user error :)?
- References:
- Possible grep(1) bug or user error :)?
- From: Garrett Cooper
- Possible grep(1) bug or user error :)?
- Prev by Date: Possible grep(1) bug or user error :)?
- Next by Date: Re: Possible grep(1) bug or user error :)?
- Previous by thread: Possible grep(1) bug or user error :)?
- Next by thread: Re: Possible grep(1) bug or user error :)?
- Index(es):
Relevant Pages
|
|