#!/bin/bash size="$1" # These two program suse the same algorithm, but fast-pseudorandom # is in C and is much faster than lcgrng, which is in Python. if type -path fast-pseudorandom > /dev/null 2>&1 then fast-pseudorandom --bytes "$size" else echo "$0: Warning: using lcgrng, which is slow. Consider building and install fast-pseudorandom" 1>&2 ./lcgrng --bytes "$size" fi