[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56453: Bug reports
From: |
GUI |
Subject: |
bug#56453: Bug reports |
Date: |
Fri, 8 Jul 2022 19:35:41 +0800 |
I'm a beginner for Linux.
Today, when I was learning the grep command, I used the man command to check
its manual and found a suspicious point.In its DESCRIPTION,it says "grep
searches for PATTERN in each FILE. A FILE of ??-?? stands for standard
input. If no FILE is given, recursive searches examine the working directory,
and nonrecursive searches read standard input. By default, grep prints the
matching lines. In addition, the variant programs egrep and fgrep are the same
as grep -E and grep -F, respectively. These variants are deprecated,
but are provided for backward compatibility."
I think there are something wrong with the sentence 'If no FILE is given,
recursive searches examine the working directory, and nonrecursive searches
read standard input. ' . Pay attention to the 'and' in "recursive searches
examine the working directory, and nonrecursive searches read standard
input".When I use the grep command,such as this:
[root@localhost ~]# grep Download dwad dawdwa Downloads Downloads ^C
[root@localhost ~]#
From this result,we can see that if no file is given, nonrecursive searches
read standard input instead of that rescursive searches examine the working
directory.
As we known, the working directory is ~,whose subdirectories have
'Downloads'.So when you type grep Download on terminal, you should see
'Downloads' under the current folder ~.
I don't know why or There is something wrong with the description of grep in
the manual.
- bug#56453: Bug reports,
GUI <=
bug#56453: Bug reports, Gary Johnson, 2022/07/08