[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug with parameter -m
From: |
Stefan Sassenberg |
Subject: |
Possible bug with parameter -m |
Date: |
Tue, 05 Jun 2007 23:57:27 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070326) |
Hello,
I'm not totally sure if this is a grep bug, but maybe you can help me
with the following problem.
I have a file named "file" containing three lines
line1
line2
line3
When I execute the following line in my bash
"while true; do grep ^ -m 1 ; done <file"
I expect the output
line1
line2
line3
after three loop runs, one for every line found in the file.
I'm not sure what happened, but recently that doesn't work anymore.
Instead the command above produces an infinite number of resulting
lines, the first one is "line1", all the other lines "line2".
The grep version is "grep (GNU grep) 2.5.1".
Is it a grep problem or maybe a bash thing? Thank you very much.
Regards
Stefan
- Possible bug with parameter -m,
Stefan Sassenberg <=