我目前正在尝试使用 shell 从文件中读取。但是,我遇到了一个语法问题。我的代码如下:
while read -r line;do
echo $line
done < <(tail -n +2 /pathToTheFile | cut -f5,6,7,8 | sort | uniq )
但是,它返回我错误syntax error near unexpected token
('`
我尝试使用 tail -n遵循How to use while read line但仍然看不到错误。
tail 命令正常工作。
任何帮助都将得到批准。