linux sed 替换 变量

job_id = 10

我想替换JOB_ID_DEFAULT为10

 

开始写法

sed 's/JOB_ID_DEFAULT/${job_id}/' test > test.ctl

不行, 后来发现外层改成双引号就可以了

sed "s/JOB_ID_DEFAULT/${job_id}/" test > test.ctl

 

 

http://blog.csdn.net/zxx2403/article/details/7245339

猜你喜欢

转载自m635674608.iteye.com/blog/2340950