*bangs head on monitor*
There must be some way to do this, but I can't seem to find it. For purely educational reasons, I am trying to figure out how to pass multiple-word parameters, i.e. "This is me", to a bash script, and have it evaluate correctly.
Inside the script, echoing $1 prints out "This is me" correctly, but the variable is not valid in if statements.
$ cat ./testscript.sh
if [ $1 = "This is me" ]; then
$ ./testscript.sh "This is me"
This is me
./testscript.sh: line 4: [: too many arguments
Escaping the spaces (./testscript.sh "This\ is\ me") doesn't seem to work, and I'm not sure what else to try