linux sed substitution variable

job_id = 10

I want to replace JOB_ID_DEFAULT with 10

 

start writing

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

No, I later found that the outer layer can be changed to double quotation marks.

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

 

 

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326477498&siteId=291194637