Hi,
I am running a shell script that executes a program. Inside this program, variables are also referenced using a dollar symbol, eg. $a, $thething, and the shell script is misinterpreting them as variables relevant to the shell script rather than relevant to the program run from inside the script. I know that's an incoherent explanation, so here is an illustration of the problem:
#!/bin/bash
#***do something that defines the variable "outside"
outside=do_stuff
specialized_program << RUNIT
inside=process_data $outside
print $inside
RUNIT
The problem is that "print $inside" prints an empty string, rather than the result of "process_data". How can I fix this?
Thanks,
H.