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
The problem seems to be inside the "program"
variable="Hello World" # quotes are needed because of the space
./program "$variable" # here quotes again
and inside the program
echo "program received $# arguments:"
i=1
for arg in "$@" # again quotes needed
do echo "arg $((i=i+1)): '$arg'" # and again
done