title: Platypus error setting variables
body: <p>I have a shell script that run flawlessly when run from terminal</p>
  
  <pre><code>sh script.sh [name_of_the_pdf_.pdf]
  </code></pre>
  
  <p>The script read the filename of a given .pdf and set some variables from the filename first characters:</p>
  
  <p>For instance, the following variable reads the first two characters from the filename and stored them as a variable:</p>
  
  <pre><code>VAR_ENDPAGE=${1:0:2}
  </code></pre>
  
  <p>Then the script runs a java program from the command line passing arguments from these stored variables:</p>
  
  <pre><code>java -jar jpdftweak.jar -i7-"${VAR_ENDPAGE[@]}" $1 -output ~/OUTPUTFILE.pdf
  </code></pre>
  
  <p>Assuming <code>[name_of_the_pdf.pdf]=2350.pdf</code> the resulting command would be:</p>
  
  <pre><code>java -jar jpdftweak.jar -i7-23 $1 -output ~/OUTPUTFILE.pdf
  </code></pre>
  
  <p>The problem is when I use this script in Platypus. I created a Droplet, and when I drop the "2350.pdf" file the program runs the script using this file as <code>$1</code> argument. All seems to be fine, but it seems to be unable to create properly the variables. For instance, the above variable returns: <code>/U</code>, so the command is:</p>
  
  <pre><code>java -jar jpdftweak.jar -i7-U/ $1 -output ~/OUTPUTFILE.pdf
  </code></pre>
  
  <p>The script is exactly the same. So the error is in the variable setting process. I tried using backticks, but anything seems to work…</p>
  
  <p>Where does this <code>U/</code> come from?</p>