I am working though Daniel Robbins bash by example series and have a problem with Part 2
at the command line I type:
which, as expected, returns:
However when i create a file called myscript.sh containing the following:
I get nothing.
I am using Suse 9.2 and have also tried the same on an 8.2 box.
What am I doing wrong?
This topic has been locked.
2 replies Latest Post - 2005-02-07T11:59:51Z by SystemAdmin
Pinned topic bash problem
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2005-02-07T11:59:51Z at 2005-02-07T11:59:51Z by SystemAdmin
Re: bash problem2005-01-27T14:16:23Z in response to SystemAdminWhen you run the shell script, it starts a new instance of bash, and does not pick up on the "myvar" which is only valid in the current shell session. Try:
The export should allow the shell script to pick up the variable.