| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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 <joshuadfranklin AT yahoo DOT com> |
| 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 |
> From: Andrew DeFaria <Andrew AT DeFaria DOT com>
> 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |