get random number shell script

Shell
$(( ( RANDOM % 10 )  + 1 ))
Source

Also in Shell: