Skip to main content
1 of 4
Stephen Kitt
  • 481.4k
  • 60
  • 1.2k
  • 1.4k

If you want to do this only using commonly-available tools (at least on Linux distributions), the most efficient way is probably to ask shuf:

shuf -i 1-139 -n 1519 -r

This produces 1519 numbers randomly chosen between 1 and 139.

Stephen Kitt
  • 481.4k
  • 60
  • 1.2k
  • 1.4k