Syntax error near unexpected token 'elif'
!/bin/bash
if [ "$1" = "boot" ] then
if [ -f /var/log/boot.log ]
then
echo /var/log/boot.log
elif [ -f /var/log/boot ]
then
echo /var/log/boot
fi
fi
This shows the output:
: command not foundline 8: GetLogfileName.sh: line 15: syntax error near
unexpected token elif' 'etLogfileName.sh: line 15: elif [ -f /var/log/boot
]
What is going wrong here??
No comments:
Post a Comment