I have the code below. I want to said
If TrackErrors > 0 or count == 0
then
MailErrors
else
MailSuccess
fi.
if [ ${trackErrors} -gt 0 || ${count} -eq 0 ]
then
MailErrors ${count}
else
MailSuccess ${count}
fi
Any helps greatly appreciated.
I figured out. I hope this will benefit others.
if [ ${trackErrors} -gt 0 -o ${count} -eq 0 ]
then
MailErrors ${count}
else
MailSuccess ${count}
fi
You can change your original structure as well by doubling the brackets:
if [[ ${trackErrors} -gt 0 || ${count} -eq 0 ]]
then
MailErrors ${count}
else
MailSuccess ${count}
fi