Hi
What is the syntax for if statement using && and || operator?
if [ [ "$ModuleBName" = "XYZ" ] && [ "$Status" != "IN PROGRESS" ] ] || [ "$Status" = "ABORTED" ]
here its giving me an error to this if statement
any suggestion??
Hi
What is the syntax for if statement using && and || operator?
if [ [ "$ModuleBName" = "XYZ" ] && [ "$Status" != "IN PROGRESS" ] ] || [ "$Status" = "ABORTED" ]
here its giving me an error to this if statement
any suggestion??
Try:
if [[ "$ModuleBName" = "XYZ" && "$Status" != "IN PROGRESS" || "$Status" = "ABORTED" ]]
or:
if [ "$ModuleBName" = "XYZ" -a "$Status" != "IN PROGRESS" -o "$Status" = "ABORTED" ]
ok, thnaks