Mercurial > hg > cc > azure
diff workers/bin/test1.sh @ 13:bba589cab837
shrinkJSON.sh: minimise "jq ." output
test1.sh: fix lrand regression
[_]findPDFs.sh: extract responses with application/pdf Content-Type
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Fri, 12 Oct 2018 08:51:50 +0000 |
parents | 36b5d379909a |
children |
line wrap: on
line diff
--- a/workers/bin/test1.sh Wed Oct 10 11:28:21 2018 +0000 +++ b/workers/bin/test1.sh Fri Oct 12 08:51:50 2018 +0000 @@ -10,6 +10,10 @@ res=res$proc home=$2 shift 2 +function lrand { +# cheap bad little random number generator +echo $(( 1 + ($(openssl rand 1 | od -d | head -1 | tr -s ' ' | cut -f 2 -d ' ') % $1))) +} if [ "$1" = "-t" ] then shift @@ -19,10 +23,6 @@ fi wp=$1 touch .running -function lrand { -# cheap bad little random number generator -echo $(( 1 + ($(openssl rand 1 | od -d | head -1 | tr -s ' ' | cut -f 2 -d ' ') % $1))) -} function tryRead { m=0 set -o pipefail