【发布时间】:2016-10-16 22:15:12
【问题描述】:
我有以下从命令读取数据的 shell 脚本。
while read _ host ip time _; do
echo $host
done < <(traceroute yahoo.fr)
以上源码返回脚本错误
./traceroute_launch: line 33: syntax error near unexpected token `<'
./traceroute_launch: line 33: `done < <(traceroute yahoo.fr)'
我在 shell 上复制了上面的源代码,它可以工作。但是当我从脚本文件运行它时,我得到了上述错误。
我错过了什么
【问题讨论】: