soham@zcon-63:~$ _OPTION_START_DATETIME=""
soham@zcon-63:~$ _OPTION_END_DATETIME=""
soham@zcon-63:~$ [ -n "${_OPTION_START_DATETIME}"]
soham@zcon-63:~$ echo $?
0
soham@zcon-63:~$ [ -n "${_OPTION_END_DATETIME}"]
soham@zcon-63:~$ echo $?
0
soham@zcon-63:~$ [ -n "${_OPTION_START_DATETIME}"] && [ -n "${_OPTION_END_DATETIME}" ]
soham@zcon-63:~$ echo $?
1
soham@zcon-63:~$
In shell, if a condition is true then the output is zero(0). My expectation of binary operation true logical and true is true(0). But unexpectedly I am getting the output as false(1).