I\'m writing a bash script which has to pass a variable to another program:
./program $variable
The problem is, it is absolutely necessary for
did you try with var="hello world"?
var="hello world"
i tried this in my solaris box.
> setenv var "hello world" > cat temp.sh #!/bin/sh echo $1 echo $2 > ./temp.sh "$var" hello world >
as you can see the $2 is not printed.$var is considered as only one argument.
$2
$var