Hello, I am new here and to Linux/UNIX I need some help to understand Random numbers all the info I can find for this generates negetive numbers as well as positive numbers. I need it to just be positive integers.
Here is what I need
Write a script to generate a random number between 1 and 1000.
#I am also suppose to include this somehow
#make use of system date (seconds) and % operator.
Here is what I have so far
#! /bin/sh
echo $(( 1+(`od -An -N2 -i /dev/random` )%(1000+1) ))