Mail Archives: djgpp-workers/2000/04/10/12:44:47
>
> 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 -