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

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Mon, 10 Apr 2000 13:17:02 -0400
MIME-Version: 1.0
Subject: Re: Porting problems with Sh-utils (beta)
Message-ID: <38F1D44E.14700.2FC3EB@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

> 
> 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. 
> However, changing the last line to:
>  echo `echo`script executed source=$$source
> should now print the value of source.

This part is correct. See 'command execution environment' in the Bash manual. 
For 'source' to work in ./script, change the line:
> 	$(SHELL) ./script ;
to
> 	. ./script ;

- Raw text -


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