lundi 13 août 2018

If isn't working with dialog (Shellscript)

My script was working fine without the use of dualog, but when I inserted this new line instead of the old echo command, it keeps going through both options available instead of only if or only else:

if [[ $exec = "error" ]]; then dialog --msgbox "There was an error..." 0 0 echo -e "$(getdate) An error occurred, check for details: \n $exec >> ../../api-automation.log else dialog --msgbox "The user has been successfully created..." 0 0 echo -e "\n$(getdate) The user $email has been successfully created..." >> ../../api-automation fi

Aucun commentaire:

Enregistrer un commentaire