> From: Andrew DeFaria <[EMAIL PROTECTED]> > 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 http://sports.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/