我发现了错误 [: missing ]“当在bash中运行下面的行时。
[: missing
if [ ! -f "$file"]; then echo "File not found!" fi
改变
[ ! -f "$file"]
到
[ ! -f "$file" ]
更改摘要:之前添加了空格 ]
]