0

This is my bash file script using Nexus Repository Manager API:

# Send Setup script
curl -u admin:admin123 -X POST --header 'Content-Type: application/json' \
http://localhost:8081/service/rest/v1/script \
-d @setup.json

# Test scripts
printf "---------------------- SCRIPTS ----------------------"
curl -u admin:admin123 -X GET http://localhost:8081/service/rest/v1/script

# Run script
curl -u admin:admin123 -X POST --header 'Content-Type: text/plain' \
 http://localhost:8081/service/rest/v1/script/setup/run

When I run it the input is:

curl: (3) Illegal characters found in URL
./setup.sh: line 3: http://localhost:8081/service/rest/v1/script: No such file or directory
./setup.sh: line 4: -d: command not found
./setup.sh: line 5: $'\r': command not found
./setup.sh: line 7: printf: --: invalid option
printf: usage: printf [-v var] format [arguments]
curl: (3) Illegal characters found in URL
./setup.sh: line 9: $'\r': command not found
curl: (3) Illegal characters found in URL
: No such file or directory/localhost:8081/service/rest/v1/script/setup/run
./setup.sh: line 13: $'\r': command not found

Where is the problem? Is it problem with backslashes?

Wicia
  • 575
  • 3
  • 9
  • 28

0 Answers0