我有很多按顺序调用的BASH脚本,例如,script1.sh包含:
#!/bin/bash
bash script2.sh
bash script3.sh
bash script4.shscript2.sh包含:
#!/bin/bash
file_a="1.txt"
cp $file_a /tmp/$file_a.tmpscript3.sh包含:
#!/bin/bash
wc -l /tmp/$file_a.tmpscript4.sh包含:
#!/bin/bash
cat /tmp/2.txt $file_a.tmp > file3.txt每个文件都需要访问一个很小的变量集合。如何将变量从一个脚本传递到另一个脚本?
发布于 2014-10-20 19:59:04
https://stackoverflow.com/questions/26465073
复制相似问题