buggrep - Bugs: bug #13225, -m option doesn't work in win32...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #13225: -m option doesn't work in win32 version of grep

Submitter:  None
Submitted:  Mon 30 May 2005 06:55:17 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Mon 30 May 2005 07:04:59 PM UTC, comment #1: 

I guess you are piping standard output from another command into Grep, and you expect both Grep and the other command to run in parallel and stop as soon as Grep finds the specified match.  In Windows (at least the older versions that I am familiar with) pipes are handled by running the first command, storing its output, and then, after that command is finished, running the second command, feeding it the stored data.  Thus you have to wait for the first command to finish before Grep can do its work.  This is not a bug in Grep, but just a "feature" of Windows.

If you disagree, please re-open this bug report and state exactly what command you used in such a way that we can reproduce the effect, and state what version of Windows you are using and what shell (command.com, cmd.exe, Cygwin Bash, etc.).

Julian Foad <julianfoad>
Mon 30 May 2005 06:55:17 AM UTC, original submission:  

Developers,

I'm not sure if you support grep in a win32 environment, but I'm using grep using the -m option.  It's parsing output and should stop after one instance is found (-m 1).  In a linux environment, it works properly, but in windows it does not.  I've used the cygwin grep.exe as well as the win32 compile found at: http://unxutils.sourceforge.net/.  The grep version on both systems is 2.5.1.  The problem is, the data takes a while to output, but every instance is the same, so if I get one hit, it can stop.  In windows, it doesn't stop until the output has stopped.

Please let me know what other details I can provide to help. 

Thanks!!!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-30 julianfoad StatusNone Invalid
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code