Quote:
Originally Posted by linosaurusroot
Double quotes around your variable is the right way to do this.
Code:
case "$banana" in
thing) do_1;;
otherthing) do_2;;
*) do_3;;
esac
|
my script already has this setup with the "" around the variable but luckily that part is only single words.
The variable i pass to it afterwards will be the ones that have spaces.
Here is what i currently have to do:
./script variable1 "variable 2" "variable 3"
and what i would like to know if its possible to be able to call variable 2 and 3 etc without having to wrap them with "" each time.