If condition giving syntax error. Need help.

Hi,

I have an if condition on executing it is giving syntax error as below:
--------------------------------------------------------------------------------------

line 61: syntax error in conditional expression
./play_test.sh: line 61: syntax error near `]'
./play_test.sh: line 61: `      if [[ "${Input_parameters[0]}" = "-h" ] || [ "${Input_parameters[0]}" = "--help" ] || [ "${No_of_input_params}" -lt 0 ]]' 

--------------------------------------------------------------------------------------
What may be the issue?

Line 61 code is as below:
--------------------------------------------------------------------------------------

if [[ "${Input_parameters[0]}" = "-h" ] || [ "${Input_parameters[0]}" = "--help" ] || [ "${No_of_input_params}" -lt 0 ]]

--------------------------------------------------------------------------------------

Please help.

Regards,
Ramki

The last test has double square brackets when you opened with a single bracket

remove the inner single brackets:

if [[ ${Input_parameters[0]} = "-h" || ${Input_parameters[0]} = "--help"  ||  ${No_of_input_params} -lt 0 ]]

Note that the single = is ksh 88 syntax. Bash / ksh93 and zsh require a double == . Also, number of input parameters less than zero?