GNU bug report logs -
#56453
Bug reports
Previous Next
Full log
Message #19 received at 56453 <at> debbugs.gnu.org (full text, mbox):
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 directory, and nonrecursive searches read standard input. ".
>
> 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.