how do i generate random integer using only shell script

Hi All,

I need to generate 4 digit random no using only shell script.

Please help in this ASAP.

Thanks in advance...

Regards,
sridhar.

echo $RANDOM

it might be larger then 4 digits so you will have to add logic to do what you need.