delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/04/10/15:44:35

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Mon, 10 Apr 2000 16:16:22 -0400
MIME-Version: 1.0
Subject: Re: Porting problems with Sh-utils (beta)
Message-ID: <38F1FE56.2192.1342F3@localhost>
In-reply-to: <200004101939.AAA00860@midpec.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000410194443 DOT 26090B-100000 AT is> (message from Eli Zaretskii on Mon, 10 Apr 2000 19:50:16 +0200 (IST))
X-mailer: Pegasus Mail for Win32 (v3.12c)
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

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

Here are some curious items I came across:
# source does not get set
source='here is some text' echo $source

# source does get set
source='here is some text' ; echo $source

# source does get set, and so does source2
source='here is some text' source2='here is more more text'
echo "$source"
echo "$source2"

It would seem that multiple variable assignments are ok, but a variable 
assignment followed by a non-variable assignment isn't.

- Raw text -


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