通过一个中间文件进行:
#!/bin/bash
(
subvar=
"hello shell"
echo
"$subvar"
> temp.txt
)
read
pvar < temp.txt
echo
$pvar
2024-03-14 08:55:22
通过一个中间文件进行:
#!/bin/bash
(
subvar=
"hello shell"
echo
"$subvar"
> temp.txt
)
read
pvar < temp.txt
echo
$pvar