X-Git-Url: https://git.armaanb.net/?p=bin.git;a=blobdiff_plain;f=fortune;h=fde90857a6d61e6d17080364c1c9a470158f888a;hp=cbf19848130a0f74ad677e2fc98f0ae98cf901b1;hb=ee45620fbb606b6fc57c5782202514f0260541c5;hpb=ac048d408d3be1cf142bf5b8f5806060565e0cae diff --git a/fortune b/fortune index cbf1984..fde9085 100755 --- a/fortune +++ b/fortune @@ -89,7 +89,7 @@ $1 == "%" { } END { - "date +%N" | getline time - srand(time) + "od -A n -t d -N 3 /dev/urandom" | getline seed + srand(seed) print fortunes[int(rand() * (f - 2)) + 1] }' $FILE