Hi i am working on somoething , i need to create a if statement which will take multiple variables in \'&&\' and \'||\' combination . for now i am trying to this thi
In bash, you can do it like this:
if [[ ( $pcount == 0 && $ucount == 0 ) || ( $flag == 1 ) ]] then echo "do stuff" fi
Alternatively:
if [ "$pcount" -eq 0 -a "$ucount" -eq 0 ] || [ "$flag" -eq 1 ] then echo "do stuff" fi
But, I would recommend the first approach.