Global variables in shell script?
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).
精彩评论