www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2005/01/01/05:31:04

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Sat, 01 Jan 2005 12:29:09 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-ID: <01c4efec$Blat.v2.2.2$e02a37c0@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <1104530868.41d5cdb4750b2@webmail.wilkes.edu>
(fdonahoe AT wilkes DOT edu)
Subject: Re: Strange failure of egrep stub
References: <1104530868 DOT 41d5cdb4750b2 AT webmail DOT wilkes DOT edu>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Fri, 31 Dec 2004 17:07:48 -0500
> From: fdonahoe AT wilkes DOT edu
> 
> The failure came on the very first time egrep was invoked.
> Rewritten as:
> 
> egrep 'This is (ifnothtml|ifinfo|ifnottex) text' cond.out \
>   >./cond-1 || exit 2
> 
> fails with 0 bytes in cond-1.

My first guess would be that we have some snafu with redirection.

Let's first find out whether the problem is at all with egrep.  What
version of Bash do you have installed, and does the behavior change if
you use a different version of Bash?  (I understand that the same
command works if invoked from the cmd.exe prompt, right?  That is,
assuming that you replace single quotes with double quotes, to prevent
the `|' characters from being interpreted by cmd.exe.)

> grep is never given the chance to produce its output which
> would be correct!  If grep -E be substituted for egrep in
> all four instances, cond-[1-4] are left with correct data
> and the whole test is passed.

What is egrep in your setup?  Is it a Bash shell script that invokes
"grep -E" or something else?

> My conclusion is that egrep.exe invokes the djgpp2/coff grep
> differently from the unsuopported coff grep, so that exit 2 happens
> before grep produces its output.

Sorry, I cannot understand this.  What is djgpp2/coff and what is
``unsupported coff grep'', and how is their invocation relevant to
this problem?

- Raw text -


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