GNU bug report logs - #56453
Bug reports

Previous Next

Package: grep;

Reported by: "GUI" <1678556598 <at> qq.com>

Date: Fri, 8 Jul 2022 16:40:01 UTC

Severity: normal

Tags: notabug

Full log


Message #19 received at 56453 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: GUI <1678556598 <at> qq.com>
Cc: 56453 <at> debbugs.gnu.org
Subject: Re: 回复: 回复: bug#56453: Bug reports
Date: Sat, 9 Jul 2022 13:24:09 -0500
On 7/9/22 05:16, GUI wrote:
> Thank you very much.I think there are something wrong with my expression.
>
> grep Download
>
> When you type something, hitting grep will do a row match
>
> The "grep Download" command has no file.So it is the case that"If no FILE is given, recursive searches examine the working&nbsp; directory,&nbsp; and nonrecursive searches read standard input.&nbsp;".
>
> When I type the command,the terminal will do two things which are 'recursive searches Examine the working directory' and 'nonrecursive searches read standard input'.In this case, Download should be used as a matching string, but instead of going through all the files in the current directory, the terminal waits for the user's input.
>
> So I think it's a little different from what you wrote.
>

Plain "grep Download" does not use -r, so it's not recursive. Also, it 
specifies no FILE operands, so the sentence you quoted applies, and it 
searches standard input (in this case, the terminal).

The command "grep -r Download", in contrast, is nearly equivalent to 
"grep -r Download .". That is, it recursively searches the working 
directory, ignoring standard input.





This bug report was last modified 2 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.