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