Bash

Bash specific things, see the Linux Cheatsheet for more.

Random sleep - use /bin/bash, not /bin/sh

#!/bin/bash

MAX=32768
MIN=1
SLEEP=$((RANDOM % MAX + MIN))
echo "Waiting $SLEEP second(s)"
sleep $SLEEP

You can also use SRANDOM in Bash >= 5.1 for a stronger random.

Temporarily disable history

set +o history