九天星 写了:因为这是一个字符串
不是您理解的这样
代码: 全选
$ help source
source: source filename [arguments]
Execute commands from a file in the current shell.
Read and execute commands from FILENAME in the current shell. The
entries in $PATH are used to find the directory containing FILENAME.
If any ARGUMENTS are supplied, they become the positional parameters
when FILENAME is executed.
Exit Status:
Returns the status of the last command executed in FILENAME; fails if
FILENAME cannot be read.
source命令是在当前shell执行命令,命令执行环境跟用户手动输入执行时是一样的
本意是想把echo的输入重定向给source去执行,但管线(Pipiline)会再开一个新的shell去执行source
"Process Substitution"(<(list))的结果是list的标准输出文件
例如:
代码: 全选
$ echo <(date)
/dev/fd/63
此帖的提问主要是为了解决
这个问题.