0
#!/bin/bash
while read line; do
grep "$line" file1.txt
if [ $status -eq 1]
echo "$line" >> f2.txt
done < f3.txt
当我执行包含上述脚本的shell脚本时。我得到以下错误:从使用shell脚本的文件逐行读取
./test.sh: line 7: syntax error near unexpected token `done'
./test.sh: line 7: `done < f3.txt'
任何人都可以帮助我,为什么我得到这个错误?
在问这里之前,请先查询http://www.shellcheck.net/以查找语法错误! – oberlies