开发者

shell script command doubt

开发者 https://www.devze.com 2023-01-28 19:19 出处:网络
I have a command in my shell script CONFIGS=\"`tar -tzf ${CONFIGS_ARCHIVE}`\" CONFIGS_ARCHIVE is tar.gz file. If the command is executed what will be the value of CONFIGS?

I have a command in my shell script

CONFIGS="`tar -tzf ${CONFIGS_ARCHIVE}`"

CONFIGS_ARCHIVE is tar.gz file. If the command is executed what will be the value of CONFIGS?

Thanks, Linux开发者_如何学JAVAPenseur


` quote is for executing the command. Unless you put that ` quote, shell will treat that command as a regular string. If you want to execute a command and save it to a variable like you do, you must put that ` quote

0

精彩评论

暂无评论...
验证码 换一张
取 消