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
When you call your script pass the arguments within quotes.
Example script:
#!/bin/bash
for arg in "$@"; do
echo "arg: $1";
shift;
done
When you call it with:
./program "parameter with multiple words" parameter2 parameter3 "another parameter"
The output should be:
arg: parameter with multiple words
arg: parameter2
arg: parameter3
arg: another parameter