I need to send a variable to another script (BASH) and uset after in this first script. The code goes something like this:
read var
source myscipt.sh $var
echo $var
The problem is that if y put spaces when entering $var after sending it to myscript.sh I only have the first one.
NOTE: In myscript.sh I only use $1 does this have something to do with the problem?
Thanx!!!
var? When yousourceit, it runs in the same shell, and hence will modify the variables of the "parent" script. This is one of the reasons you should generally run scripts with./myscript.shrather thansource