开发者

Global variables in shell script?

开发者 https://www.devze.com 2023-04-12 13:59 出处:网络
file.sh variable=\'String test!\' sh show.sh show.sh echo $variable 开发者_运维知识库 How to send variables to another file?

file.sh

variable='String test!'
sh show.sh

show.sh

echo $variable
开发者_运维知识库

How to send variables to another file?

Thanks.


How about exporting it

export variable='String test!'

See that link, there's a great example out there (they're doing exactly what you are trying to do).

0

精彩评论

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