I have a script that uses curl to send a file to our third party cloud file storage.
I am using grep to pull out a URL provided to me in an http response
looks like this
curl -X PUT -T media/file.tar.gz -D - \
-H "ETag: ${md5}" \
-H "Content-Type: application/x-gzip" \
-H "${AuthToken}" \
-H "X-Object-Meta-Date: ${today}" \
"${StorageUrl}/dp/file1.tar.gz"
and then I get a bad request on the url which prints out like
'PUT /v1/MossoCloudFS100213=123-123-1233a-ss9\r/dp/file1.tar.gz'
see that \r that just annoyingly has been injected between my variable and the /dp/?