From 4e3fe0c2e251806876e9876a832c497ffe49573b Mon Sep 17 00:00:00 2001 From: fpunktk Date: Sat, 30 Dec 2017 12:22:37 +0100 Subject: [PATCH] use more randomness --- anondcim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anondcim b/anondcim index f8ca87c..bbaae33 100755 --- a/anondcim +++ b/anondcim @@ -30,7 +30,7 @@ die() { rand() { # random number between 0 and $1 - 1 # read from urandom, sh interpretes numbers with leading 0 wrong, so prepend $1 which doesn't change the result - echo $(( $1$(tr -dc "0-9" < /dev/urandom | head -c $((${#1} + 1))) % $1 )) + echo $(( $1$(tr -dc "0-9" < /dev/urandom | head -c $((${#1} + 2))) % $1 )) } [ $# -gt 0 ] || die "Usage: $0 [-p image_prefix] [-s destination_size (absolute or percentage)] [-d destination_directory] imagefile(s)" -- 2.30.2