title: Running remote script effects to change parameters
body: <p>I've a simple bash script to run the parameter as a command on the server, the necessity for this i am creating the required command as a string on the other server and trying to execute it remotely.</p>
  
  <pre><code>PROFILE=/coremedia/home/picroot/.profile
  source $PROFILE
  cmd=$1
  shift
  eval $cmd "$@"
  </code></pre>
  
  <p>the parameter i am sending to script :</p>
  
  <p><code>/coremedia/pic-cms-tools/bin/cm publish -u admin -p admin -t "/Config/Static Texts/PDF Texts/pdf.eudatasheet.ocEnergyConsConvAlone" "/Config/Static Texts/PDF Texts/pdf.eudatasheet.ocEnergyConsForcedAlone</code>"</p>
  
  <p>The debug screen when i am running the scriipt locally, works perfectly with the <code>''</code> signs..</p>
  
  <pre><code>/coremedia/pic-cms-tools/bin/cm publish -u admin -p admin -t '/Config/Static Texts/PDF Texts/pdf.eudatasheet.ocEnergyConsConvAlone' '/Config/Static Texts/PDF Texts/pdf.eudatasheet.ocEnergyConsForcedAlone'
  </code></pre>
  
  <p>when i'm running the same script via ssh with backticks remotely with the same parameter above <code>$cmd</code> :</p>
  
  <pre><code>@lines = `ssh "$user"@"$host" "bash -x myscript.sh $cmd"`;
  </code></pre>
  
  <p>Debug screen shows me running command like :</p>
  
  <pre><code> /coremedia/pic-cms-tools/bin/cm publish -u admin -p admin -t /Config/Static Texts/PDF Texts/pdf.eudatasheet.ocEnergyConsConvAlone /Config/Static Texts/PDF Texts/pdf.eudatasheet.ocEnergyConsForcedAlone
  </code></pre>
  
  <p>without the  <code>''</code> signs. Why does it change the parameters ?</p>
  
  <p>I've tried many configurations on my side to handle the string but i've still couldn't reach a solution, obviously i am missing a small critical thing...</p>
  
  <p>Any help would be appreciated, many thanks in advance!</p>