"规范"内置POSIX shell eval
的有用性示例如下:
>foo=10
>x=foo
>eval y='$'$x
>echo $y
10
但POSIX shell标准说:
The eval utility shall construct a command by concatenating arguments together, separating each with a <space> character. The constructed command shall be read and executed by the shell.
事实上,我无法找到任何非平凡的例子(即,结果不能简单地实现)eval
使用此类连接?
请告诉我。