我想发送这样的请求curl:
curl some parameters and headers --data-binary '{"secret":"$1"}'
Run Code Online (Sandbox Code Playgroud)
但$1不是可变的。我尝试使用echo这个命令:
echo '{"asd":"$1"}' dhkdgb
Run Code Online (Sandbox Code Playgroud)
我得到了这个输出:
{"asd":"$1"} dhkdgb
Run Code Online (Sandbox Code Playgroud)
但是,我想得到这个输出:
{"asd":"dhkdgb"}
Run Code Online (Sandbox Code Playgroud)
根据curl要求,我想发送以下内容:
curl some parameters and headers --data-binary '{"secret":"argv 0 of script"}'
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?