delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/07/24/01:55:11

Date: Mon, 24 Jul 2000 08:53:30 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Bug in bash 2.03's handling of compound commands?
In-Reply-To: <397B5CE7.64B5954@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1000724085213.11435A-100000@is>
MIME-Version: 1.0
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

On Sun, 23 Jul 2000, Richard Dawe wrote:

> It turned out that I was actually using bash 1.14.7. I upgraded to bash
> 2.03 and retested. The above commands work correctly in interactive mode
> under bash 2.03, unlike under bash 1.14.7. However, compound commands
> don't seem to work correctly in scripts. If I run the attached script,
> testcomp.sh, I get the following output:
> 
>     bash-2.03$ ./testcomp.sh
>     + bob
>     ./testcomp.sh: bob: command not found
>     + echo 127
>     127
>     + echo 0
>     0
>     + set +x

I think this is expected behavior: parenthesized commands run in a
sub-shell.  What seems to be wrong with this output?  Does a Unix box
behave differently?

- Raw text -


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