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

$[ ($RANDOM % 5 ) -2 ]

?

(I have no idea if I have the bash syntax right)

--
Alan Chandler
http://www.chandlerfamily.org.uk


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to