title: curl not working in bashscript
body: <p>I have a script which contains:</p>
  
  <pre><code>TEST=`curl -v  -X GET http://xxx/v2/${PROJECT}/${IMAGE}/manifests/${DCD}`
  TEST2="curl -v  -XGET http://xxx/v2/${PROJECT}/${IMAGE}/manifests/${DCD}"
  echo "output"
  echo ${TEST}
  echo "output2"
  echo ${TEST2}
  </code></pre>
  
  <p>This is the output of TEST and TEST1:</p>
  
  <pre><code>* Illegal characters found in URL
  * Closing connection -1
  output
          ##empty
  output2
  curl -v -XGET http://xxx:5000/v2/proj1/base/manifests/sha256:a1f97fd03ec62888fb315745cde69acb7c98d0fae7xxx
  </code></pre>
  
  <p>If I copy the content of the output2 (curl -v...) and execute it than it works fine (that is what I try to do in output1). So it seems that the command is filled in correctly. But The execution of that command (what happens in output1) seems to fail with: Illegal character found in URL. </p>
  
  <p>I really don't have a clue what is going wrong</p>
  
  <p>Whole content of script with <code>cat -A</code></p>
  
  <pre><code>#!/bin/sh$
  #ENV VAR to set in Jenkins Job$
  PROJECT="proj1"$
  IMAGE="base"$
  TAG="1.2"$
  $
  # Find Docker-Content-Digest$
  DCD=`curl -v -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET http://xxx:5000/v2/${PROJECT}/${IMAGE}/manifests/${TAG} 2&gt;&amp;1 | grep Docker-Content-Digest | awk '{print ($3)}'`$
  $
  # Delete tag in registry using DCD$
  # I just want to execute the command belowe but gave the illegal argument erros so tried some debugging with this$
  TEST=`curl -v -X GET http://xxx:5000/v2/${PROJECT}/${IMAGE}/manifests/${DCD}`$
  $
  TEST2="curl -v -XGET http://xxx:5000/v2/${PROJECT}/${IMAGE}/manifests/${DCD}"$
  echo "output"$
  echo ${TEST}$
  echo "output2"$
  echo ${TEST2}$
  $
  </code></pre>