I am writing a makefile in bash and I have a target in which I try to find if a file exists and even though I think the syntax is correct, i still gives me an error.
Here is the script that I am trying to run
read:
if [ -e testFile] ; then
cat testFile
fi
I am using tabs so that is not a problem.
The error is (when I type in: "make read")
if [ -e testFile] ; then
cat testFile
fi
/bin/sh: Syntax error: end of file unexpected (expecting "fi")
make: *** [read] Error 2
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…