diff options
author | axtloss <60044824+axtloss@users.noreply.github.com> | 2021-04-24 11:42:19 +0200 |
---|---|---|
committer | jnats <dev@jnats.xyz> | 2021-04-24 11:41:54 +0100 |
commit | 18dfefdec56bc208dd7698d294de8405d116b8f3 (patch) | |
tree | 65178d75e8195f9942c30176fd6df767d0ca7d7f /nofetch | |
parent | 9f6f503d940aff829716017f370766162253066f (diff) | |
download | nofetch-18dfefdec56bc208dd7698d294de8405d116b8f3.tar.gz nofetch-18dfefdec56bc208dd7698d294de8405d116b8f3.tar.bz2 |
fixed an issue, where you could specify a number higher than the count of numbers
Diffstat (limited to '')
-rwxr-xr-x | nofetch | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -4,7 +4,12 @@ if [[ $1 == "" ]]; then rng=$((1 + $RANDOM % 11 )) else - rng=$1 + if [[ $1 -lt 11 ]]; + then + rng=$1 + else + rng=$((1 + $RANDOM % 11 )) + fi fi if [ $rng -eq 1 ] |