我有卷曲命令:
curl -u ${USER_ID}:${PASSWORD} -X GET 'http://lppma670.gso.aexp.com:8080/rest/job-execution/job-details/${job_id}'
变量job_id在其中有一个值,例如1160.当我在shell中执行curl命令时,会给我以下错误:
{"message":"Sorry. An unexpected error occured.", "stacktrace":"Bad Request. The request could not be understood by the server due to malformed syntax."}
如果我在命令中直接传递号码’1160′,如下所示,curl命令可以正常工作.
curl -u ${USER_ID}:${PASSWORD} -X GET 'http://lppma670.gso.aexp.com:8080/rest/job-execution/job-details/1160'
有人可以帮我吗我想要在curl命令中传递变量的值.