I\'m interest in some thing : every time I echo $RANDOM
, the show value difference . I guess the RANDOM is special (When I read it , it may call a function , s
If you are BASH scripting there is a $RANDOM variable already internal to BASH. This post explains the random variable $RANDOM:
http://tldp.org/LDP/abs/html/randomvar.html
It generates a number from 0 - 32767.
If you want to do different things then something like this:
case $RANDOM in
[1-10000])
Message="All is quiet."
;;
[10001-20000])
Message="Start thinking about cleaning out some stuff. There's a partition that is $space % full."
;;
[20001-32627])
Message="Better hurry with that new disk... One partition is $space % full."
;;
esac