$ python -c 'import random; print(random.randint(0,1000000-1))' ExplanationStackOverflow has a dozen different ways to generate numbers, all of which fall apart after 3-4 digits. This solution requires Python to be installed, but is simple and direct. LimitationsRequires Python, it's not a pure-Bash solution |