Perhaps the title is incorrect, but here is the situation: in
~/.profile, I define value for variable
foo. I am writing a script which needs the value of
foo:
Code:
#!/bin/sh
echo "$foo"
Yet, upon execution, I simply see a blank line meaning that
foo is not inherited into the shell executing the script. I know that
foo is defined as I can see its value at the shell prompt:
Code:
$ echo $foo
value
$
For what it's worth, I'm running this within the Korn shell.
Any pointers would be appreciated.