Search the file /usr/share/dict/words for any 4 or 5 digit numbers and display the first randomly chosen line from the results.
grep -E "^[0-9]{4,5}$" /usr/share/dict/words | head -n $(shuf -i 0-1000 -n 1)