delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/17/14:25:45

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
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Bernard A Badger" <bab AT vx DOT com>
To: <dan AT danamis DOT com>, <cygwin AT cygwin DOT com>
Subject: RE: Broken since 1.3.10, or earlier
Date: Wed, 17 Jul 2002 14:27:50 -0400
Message-ID: <INEKLKBFCDBPKMKAJLMDIEBJCGAA.bab@vx.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
In-reply-to: <ACEIKCIGAEOGOHGPJPIAMECLCDAA.DanHiggins@austin.rr.com>
Importance: Normal

Another off-topic find/grep idea:

$ find . -name '*.java' -print0 | xargs -0 grep 'Copyright' /dev/null

The find -print0 goes with the xargs -0 option to use NUL-terminated strings.
The /dev/null is included in grep to force the name to print.
(Grep prints the name if there's more than one file input.)

A sample of the output might look like this:
glut-3.7.3/progs/advanced/shadowfun.c:/* Copyright (c) Mark J. Kilgard, 1997.
*/
glut-3.7.3/progs/advanced/texwinalign.c:/* Copyright (c) Mark J. Kilgard, 1998.
*/
glut-3.7.3/progs/advanced/videoresize.c:/* Copyright (c) Mark J. Kilgard, 1996.
*/

Is that any help?
>
> I know that one, but it doesn't give me the file path. My idea behind the
> syntax is that I have a bit more flexibility to do some other stuff, since I
> know both the line and the path to the file. Of course, if I didn't need to
> worry about spaces in pathnames, I'd just use a for loop.
>
> But forget about the syntax for a moment. The real issue here is what *bash*
> is doing.
Well, I can't help there.


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019