I have something like the following, a shell script with:
FOO="bar gum"
$ spark-submit --verbose --class SomeApp some.jar "$FOO"
However this would result in:
Main class:
SomeApp
Arguments:
bar
gum
Where as what I expected was a single argument of 'bar gum'
/update
So much for dumbing down this question
What I really had was:
FOO="bar gum"
$ ssh host spark-submit --verbose --class SomeApp some.jar "$FOO"
This should've been:
FOO="bar gum"
$ ssh host spark-submit --verbose --class SomeApp some.jar \"$FOO\"
When you send a command through the ssh command, any double quotes are interpreted by your local, current shell.
Say you have a simple script, print-first-arg.sh on the remote:
Then
Results in
On the remote.
Use:
and it results in:
On the remote