Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20020222172206.41111.qmail@web20010.mail.yahoo.com> Date: Fri, 22 Feb 2002 09:22:06 -0800 (PST) From: Joshua Daniel Franklin Subject: Re: [ANNOUNCEMENT] Updated: grep-2.5g To: cygwin AT cygwin DOT com In-Reply-To: <1014371170.6704.ezmlm@cygwin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 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 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/