I am using bash to script a basic check. It is in a java environment, and I'm pulling the xmx, xss and xms values from the environment, and then comparing them to a predefined standard. Here is a very simplified version:
xmxstd=1024
xmsstd=512
xssstd=256
xmxval=756
xmsval=512
xssval=128
if [ $xmsstd > $xms_val -o $xssstd > $xss_val -o $xssstd > $xss_val ]; then
echo "<OFFENDING VALUE>"
fi
I don't know if this is possible in bash or not, but I just want to echo out whatever evaluates to be true in the above statement. Maybe I'm missing something stupid, but i've been all over the place and can't find anything on it and I don't want to end up writing this out in three different if's unless I have to.