what is wrong with the below script:
---------------------------------------------------------------------------------
#!/bin/bash
echo "Setting JrePath..."
grep -w "export JrePath" /etc/profile
Export_Status=$?
if [ $Export_Status -eq 0 ]
echo "JrePath declared"
elif [ $Export_Status -gt 0 ]
echo "JrePath not declared"
echo "export JrePath=/etc/alternatives/jre" >> /etc/profile
echo "JrePath declared"
fi
--------------------------------------------------------------------
I am getting the following error:
jrepath: line 9: syntax error near unexpected token `elif'
jrepath: line 9: `elif [ $Export_Status -gt 0 ]'
Kindly help..