Let\'s say I have a really simple shell script \'foo\':
#!/bin/sh echo $@
If I invoke it like so:
foo 1 2 3 >
foo 1 2 3
You need to quote the quotes:
foo 1 "\"this arg has whitespace\"" 3
or (more simply)
foo 1 '"this arg has whitespace"' 3
You need to quote the double quotes to make sure that the shell doesn't remove them when parsing word arguments.