#!/bin/bash read -p "How many digits? " numlen head /dev/urandom | LC_CTYPE=C tr -dc 'A-Za-z0-9' | fold -w $numlen | head -n 1