How can I include spaces as part of a variable used in an svn command for RHEL bash scripting? Or if there's something else wrong with the following, please advise.The SVN URL variable has no spaces, and this section is working:svn checkout $svnUrl $checkoutDir --username $username --password $password --non-interactive --depth immediates --no-auth-cacheBut the SVN update command that works when hard coded is not working as a variable:updateSubProject=&& svn update --set-depth infinity --no-auth-cache --username $username --password $password --non-interactivecd project-dir $updateSubProjectcd ../another-project $updateSubProject
What's the proper way to use a variable with spaces in part of a shell script command?
bash;command line;rhel;subversion;variable substitution
Better would be to make a function to do it likeupdateSubProject() {    pushd $1    svn checkout $svnUrl $checkoutDir --username $username --password $password --non-interactive --depth immediates --no-auth-cache    popd}updateSubProject project-dirupdateSubProject path/to/another-projectthis way you aren't trying to store code in a variable, and you'll avoid a lot of the word splitting issues.