2022-03-30 00:03:16 +03:00

8 lines
159 B
Bash
Executable File

#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage: $0 LEN - get random number with length LEN"
exit 1
fi
cat /dev/urandom | tr -dc '0-9' | fold -w $1 | head -n 1