bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add ACTION=warn


From: jidanni
Subject: add ACTION=warn
Date: Sat, 06 Jun 2009 05:47:32 +0800

Man page says
       -d ACTION, --directories=ACTION
              If  an input file is a directory, use ACTION to process it.  By 
default, ACTION is read, which
              means that directories are read just as if they were  ordinary  
files.   If  ACTION  is  skip,
              directories  are  silently  skipped.   If  ACTION  is recurse, 
grep reads all files under each
              directory, recursively; this is equivalent to the -r option.

Add an example of when ACTION=read of ever finding anything, or admit
$ grep -c . /
0
$ grep -vc . /
0
else people will wonder what you are talking about.

Also add an ACTION=warn, which acts like
$ wc /
wc: /: Is a directory
      0       0       0 /

Of course don't warn if they are recursing.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]