delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/16/19:29:56

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
Reply-To: <dan AT danamis DOT com>
From: "Dan Higgins" <DanHiggins AT austin DOT rr DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Broken since 1.3.10, or earlier
Date: Tue, 16 Jul 2002 18:31:53 -0500
Message-ID: <ACEIKCIGAEOGOHGPJPIACEBLCDAA.DanHiggins@austin.rr.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

Greetings,

If I want to recursively find all files that contain some text, I use, for
example:

find . -name '*.java' | while read l; do grep 'Copyright' "$l" && echo "$l";
done

The output from this pipeline is inconsistent. Mostly I see bogus pathnames
that should not be there, or missing pathnames that should be there, or
duplicate lines from the grep, that sometimes even wind up overlapped by the
command prompt upon completion.

1. Don't suggest another syntax, unless it can handle paths with
   spaces in it.
2. I have already tried adding "2>&1" in various places
   throughout the line.
3. This works fine on Unix and MKS.
4. My system is Windows 2000 SP2, 1.3GHz Athlon.
5. I had Cygwin 1.3.10. I just upgraded to 1.3.12, including
   all freshly downloaded packages. No change.
6. I have already searched Google and the cygwin ml archives.
7. It has caused me much pain between the ears.

I have not been able to narrow it down to a particular program, but I
suspect it has to do with piping, stdin, stdout, and Windows' general lack
of those concepts. Whatever it is, it seems pretty fundamental to me.

Any info or advice could end the pain. That would be greatly appreciated.

Regards,
-Dan


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