One - One Code All

Blog Content

如何在多重引号里面取到shell变量的值?

Linux-Mac   2009-11-25 17:17:47

双引号是不会屏蔽对变量和某些特殊符号的转义的,而单引号里的所有内容都会原封不动的输出,而单引号里再用单引号将变量引起来,变量就又可以正常的显示,有点像数学里的负负为正。


适用于 curl发送请求。

num=1
while true
do
    result_code=`curl -XPOST -H 'Content-Type: application/json' 'localhost:9200/dialog_202010/_search?pretty' -d '{"build_number":'$BUILD_NUMBER'}'
done



上一篇:pandas中groupby count按小时统计交易量
下一篇:python中pandas的series合并成dataframe

The minute you think of giving up, think of the reason why you held on so long.