Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <43204ECA.3070204@lists.cichon.com>
Date: Thu, 08 Sep 2005 16:46:34 +0200
From: Public Mailing Lists <lists@lists.cichon.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.11) Gecko/20050728
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: xargs still nok?
References: <on00i11u7d2a93lkl1hu98sav3kvi0c5cj@4ax.com> <20050908102658.GC5555@calimero.vinschen.de> <4320281B.6090005@lists.cichon.com> <uji0i1d0k7f1ehc6h48u2kr0e5kajmctpp@4ax.com>
In-Reply-To: <uji0i1d0k7f1ehc6h48u2kr0e5kajmctpp@4ax.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

zzapper wrote:

>Is Xargs still reqd for
>
>find . -name '*.cfm' -exec grep -i {} \;
>  
>
Well, not exatctly. grep -i does not show you the filename, if you call 
it this way.

You could either use

find . -name '*.cfm' -exec grep -i something {} /dev/null \;

which would make grep to show the filename. grep will think that it 
searches multiple files, and will not find something in /dev/null. This 
solution works well under Unix. With Cygwin, you may not have devices 
available in /dev, depending on your installation.

The solution with xargs is probably faster with a large number of files 
because the grep program is not started that often.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

