I was modifying an script didn't know how to write more than one condition in an if statement. I want to connect the two condition with an AND.
if [ envoi1 -eq 2 ];then if [ envoi2 -eq 0 ];then echo 'Ahora mismo.' envoi = 1 fi else if [ envoi2 -eq 1 ];then if [ envoi1 -eq 1 ];then echo 'Situacion Normal.' envoi = 1 fi else echo 'Raruno' envoi=`expr $envoi1 + envoi2` fi fi
Now i use nested if to do the same but the code it's not so clear for me.