I am having a big problem with a script I am trying to do to check file space usage; I have in my script the following:
if [[ "$usage -gt max_range || $usage -eq "100"" ]]
then
send_eamil
fi
I can see the value in usage and max_range, but the difference does not come out properly, it sends the mail regardless if usage is above or below the criteria given, I have used double quotes as shown in the line of code above, I have used the {} around the variables, but no luck.
In a few words, could anyone help out by explaining the best way to solve this situation, thanks.
if [[ "$usage -gt max_range || $usage -eq "100"" ]]
then
send_eamil
fi
I can see the value in usage and max_range, but the difference does not come out properly, it sends the mail regardless if usage is above or below the criteria given, I have used double quotes as shown in the line of code above, I have used the {} around the variables, but no luck.
In a few words, could anyone help out by explaining the best way to solve this situation, thanks.