Shell 中eval的用法
test.sh:
pipe="|"
eval ls $pipe wc -l
输出
bogon:Desktop macname$ ./test.sh
45
test.sh:
eval echo \$$#
输出
bogon:Desktop macname$ ./test.sh ssd dede ded dedeeeee iiii
iiii
参考:
https://blog.csdn.net/luliuliu1234/article/details/80994391