How to pass a variable in a curl command in shell scripting

前端 未结 3 1417
予麋鹿
予麋鹿 2020-12-13 06:37

I have a curl command:

curl -u ${USER_ID}:${PASSWORD} -X GET \'http://blah.gso.woo.com:8080/rest/job-execution/job-details/${job_id}\'

The

3条回答
  •  情书的邮戳
    2020-12-13 07:42

    When using variables in shell, you can only use doubles quotes, not single quotes : the variables inside single quotes are not expanded. Learn the difference between ' and " and `. See http://mywiki.wooledge.org/Quotes and http://wiki.bash-hackers.org/syntax/words

提交回复
热议问题