we get error on trying to use variable in curl url block, how i can fix it? variable is NEXUS_UPLOAD='http://mynexus.com/nexus/content/repositories/releases/ru/123/project/1.0/1.0.289/'
#!/bin/bash -v
for i in $(cat upload.list); do
content=$(curl -v -u "$NEXUS_USER":"$NEXUS_USER_PASSWORD" --upload-file "$i" "${NEXUS_UPLOAD}")
echo $content
done
error is:
* <url> malformed * Closing connection -1 curl: (3) <url> malformed
if we have direct link in this script, curl worked correctly
#!/bin/bash -v
for i in $(cat upload.list); do
content=$(curl -v -u "$NEXUS_USER":"$NEXUS_USER_PASSWORD" --upload-file "$i" http://mynexus.com/nexus/content/repositories/releases/ru/123/project/1.0/1.0.289/)
echo $content
done
using just $NEXUS_UPLOAD
without quotes getting - curl: no URL
specified!
also I try to use "$NEXUS_UPLOAD"
in script, but still get malformed error