I am writing a simple shell script where it checks the condition using if condition.
if I use like this I am getting below errorCode:if [ $name == "JOHN" ] then admin='YES'; fi
While using as below I have no errors, it is sucessful.Code:syntax error near unexpected token `fi'
Can you please let me know if I am doing some mistake in the first case. I need the first case to work so that I can format it good, since this is the only condition taking 4 lines.Code:if [ $name == "JOHN" ] then admin='YES'; fi