Problem description line 13: if[ == N]: command not found

An error occurred while writing shell test script

An error was encountered using if else elif

Problem analysis

Go to StackOverflow and find the answer

The problem belongs to the problem of syntax specification and considerations

Specification for the use of if else statements

Problem solving

Check out this answer and this answer


If ["$ifDeploy" == "N"] then echo "thank you,catch you later!" Elif ["$ifDeploy" == "Y"]
  • ifand[You need space between them
  • [And after]Before you need space

Here is:

⚠️ Also, if you write it in the wrong format, the highlighting will be different!

Related Articles:

  • Syntax error near unexpected token ‘then’

Guess you want to see:

  • Shell Script – syntax error near unexpected token `else’