jeudi 26 mars 2015

if statement unix shell script

I am using if statement to check for a condition and assign values. A mail will be sent after that. I executing the script ( bash ) but nothing really happens and I have to exit; could anyone tell me what I am doing wrong?



if [ $var -eq 0 ]
then
subject="there are zero issues"
else
subject="there are issues"
fi

mail -s "$subject" abc@gmail.com

Aucun commentaire:

Enregistrer un commentaire