Error while implementing nested if

considering all variables like S01DEPOSITS will return numbers, i am trying to execute below statement

if [[ \( "$1"  >= "${S01DEPOSITS}" -a "$1" <= "${E01DEPOSITS}" \) -o \( "$1"  >= ${S04OVERDRAFT} -a "$1" <= ${E04OVERDRAFT}  \) -o \( "$1"  >= ${S05DEPOSITS} -a "$1" <= ${E05DEPOSITS} \) -o \( "$1"  >= ${S23DEPOSITS} -a "$1" <= ${E23DEPOSITS} \) -o \( "$1"  >= ${S25DEPOSITS} -a "$1" <= ${E25DEPOSITS} \) -o \( "$1"  >= ${S33DEPOSITS} -a "$1" <= ${E33DEPOSITS} \) -o \( "$1"  >= ${S26TLR_MAINT} -a "$1" <= ${E26TLR_MAINT} \) ]]
then
  echo "Queue DEP"
fi

while executing above if statement i am getting error as

if [[ \( "$1" qcheck.sh[100]: Syntax error at line 100 : `"$1"' is not expected.

pls help as soon as possible thanks

Try one of these syntaxes:

[ condition1 -a condition2 ]    # ( condition1 AND condition2)
[ condition1 -o condition2 ]    # ( condition1 OR condition2)

or:

[[ condition1 && condition2 ]]    # ( condition1 AND condition2)
[[ condition1 || condition2 ]]    # ( condition1 OR condition2)

Additionally if you are comparing numbers then use -ge or -gt operator and remove the quotes surrounding $1.

if [[ $1  -ge "${S01DEPOSITS}" && $1 -le "${E01DEPOSITS}" ... ]]
# ge -- greater than or equal to
# le -- less than or equal to

Thanks michaelrozar17 and Franklin52 its working now...!!! :D:D:D :b: