#!/bin/bash numwords=$(cat /usr/share/dict/words | wc -l) randnum=$(dd if=/dev/urandom bs=3 count=1 2>/dev/null | xxd -u -p) index=$(dc -e " ${numwords} 16 i 0${randnum} * 1000000 / p q") head -n ${index} /usr/share/dict/words | tail -n 1