shell 父子传值
通过一个中间文件进行:
#!/bin/bash( subvar="hello shell" echo "$subvar" > temp.txt)read pvar < temp.txtecho $pvar通过一个中间文件进行:
#!/bin/bash( subvar="hello shell" echo "$subvar" > temp.txt)read pvar < temp.txtecho $pvar