I am getting the error [: missing
]'` when running the below line in bash.
if [ ! -f "$file"]; then
echo "File not found!"
fi
CodePudding user response:
change
[ ! -f "$file"]
to
[ ! -f "$file" ]
Change summary: added space before ]