[英]Global variables in shell script?
file.sh
variable='String test!' sh show.sh
show.sh
echo $variable
如何將變量發送到另一個文件?
謝謝。
如何出口呢
export variable='String test!'
看到那個鏈接,有一個很好的例子(他們正在做你正在嘗試做的事情)。
[英]Environmental/global variables are not expanded in shell script
[英]repeating variables in shell script
[英]scope of variables in shell script
[英]Access global variable in shell script
[英]Declare Variables from a shell script in the shell
[英]Shell script not recognising declared variables
[英]files containing variables shell script
[英]Passing shell script variables to find
[英]Ansible with multiline variables in shell script
[英]Store global variable out of shell script
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.