I keep getting this error message running this script. What is causing it?
Line 18 is the last line in the file which I think is a CR.
./Boa404Chk.sh: line 18: syntax error: unexpected end of file
if diff /var/log/boa/access_log /etc/boa_access_bkp >/dev/null
cat /var/log/boa/access_log > /etc/boa_access_bkp
if grep -q '404' '/var/log/boa/access_log'
sed 's/404$/===404===/g' '/var/log/boa/access_log > /etc/boa_access_bkp
cat /etc/boa_access_bkp | mail -s "BOA 404 in access_log" email@example.com
cat /etc/boa_access_bkp >> boa_access_dttlbkp #save to send at EOD
cat /dev/null > /var/log/boa/access_log
cat /dev/null > /etc/boa_access_bkp