This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: grep-2.5g

> From: Andrew DeFaria <>
> Subject: Re: [ANNOUNCEMENT] Updated: grep-2.5g
> Date: Thu, 21 Feb 2002 19:09:50 -0800
> grep: foo: is a directory
> I see there is a -d option and I can say -d skip. I guess what I'm asking for
> then is
> to have -d default to skip instead of read.
Or you could just use 'grep -s'.
>From 'man grep':

       -s, --no-messages
              Suppress  error  messages  about   nonexistent   or
              unreadable  files.   Portability  note:  unlike GNU
              grep, traditional grep did not conform to  POSIX.2,
              because traditional grep lacked a -q option and its
              -s option behaved like GNU grep's -q option.  Shell
              scripts intended to be portable to traditional grep
              should avoid both -q and  -s  and  should  redirect
              output to /dev/null instead.

grep-aholics might also be interested in:

       -r, --recursive
              Read  all  files under each directory, recursively;
              this is equivalent to the -d recurse option.

I used to always use find -exec grep {} \; until I switched to 
GNU grep 2+, which has the -r option.

Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]