delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/04/10/14:33:00

Date: Tue, 11 Apr 2000 00:39:14 +0500
Message-Id: <200004101939.AAA00860@midpec.com>
From: Prashant TR <tr AT midpec DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.SUN.3.91.1000410194443.26090B-100000@is> (message from Eli
Zaretskii on Mon, 10 Apr 2000 19:50:16 +0200 (IST))
Subject: Re: Porting problems with Sh-utils (beta)
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000410194443 DOT 26090B-100000 AT is>
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 Mon, 10 Apr 2000, Mark E. wrote:
> 
> > Actually, I think the snippet should be modified to:
> > 
> > > all:
> > > 	source='There is no bug in BASH!'  ; \
> > > 	$(SHELL) ./script ;
> > > 	echo `echo`script executed
> > > 
> > 
> > Line continuation is fine, but you still have to use ';' for multiple 
> > commands. With the modified version, 'echo $source' is empty inside 
> > './script', but I think that's correct since the value isn't exported.
> 
> No, I don't think so, on both counts.  The syntax "foo=bar baz" is a 
> valid Unix shell syntax of a single command: it assigns the value "bar" 
> to the variable `foo' and then runs the command `baz' while exporting 
> to it this value of `foo'.

I agree with Eli. In the second example (and the first), ./script is the
shell-script being executed and everything else is just a command line that's
passed to it. So, in both cases, the value of source must be passed on to this
script. If not, why is it that only `...` causes the problem, while everything
else seems to work fine?

What I think is happening is that the value of source is being lost after the
execution of the 1st process (that's `echo`). And since the script is invoked
next (the 2nd process to run), the "source" value is for some reason not passed
on which I think is a bug.

- Raw text -


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