$[ ($RANDOM % 5 ) -2 ]Soren Orel wrote:
I know I could generate numbers like: 0; 1; 2
with:
$[ ( $RANDOM % 3 ) + 0 ]
But how could I generate numbers like: 0; 1; 2; -1; -2; etc? So negative+positive numbers too + zero
thank you
?
(I have no idea if I have the bash syntax right)
--
Alan Chandler
http://www.chandlerfamily.org.uk
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org