for AND (&&) use --> "-a" option
for OR (||) use --> "-o" option
eg.,
if [ "$BatchFrequency" = "Daily" -a "$ModuleBusinessName" = "XYZ" -a "$Status" = "COMPLETED SUCESSFULLY" -o "$Status" = "ABORTED" ]
The logical AND and OR conditions will remain same. Use "elif" in place of "[FONT=Arial]Else if" and after the final else with the associated statement end the if block with "fi" .
Eg:
if [ $int1 = $int2 ]
then
echo "int1 is equal to int2"
elif [ $int1 > $int2 ]
then
echo "int1 is greater than int2"
else
echo "int1 is smaller than int2"
fi
Alternative Way:
is equal to: eq
is not equal to: ne
is greater than: gt
is less than: lt
is greater than or equal to: ge
is less than or equal to: le
-a is same as using &&
-o is same as using ||
Note: Padding of space is mandatory before using '[' and ']'
Place the mail part script in a function and try for checking the conditions..
And if your using double square brackets then use && or || , for single square bracket you can use -a or -o