seq --equal-width 0 1 9999 | sort --random-sort > result.txt
Easier to read and works with embedded Linux systems (BusyBox):
seq -w 0 1 9999 | shuf > result.txt
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.