I need add random number to filename. On Linux I use command like
filename$(shuf -i 10000000-99999999 -n 1)
But on MacOs with this command I recieve error:
sh: shuf: command not found
Here are another solution on MacOs for make it?
Bash $RANDOM is a pretty good solution. Alternatively, you can use "jot", which comes pre-installed on Mac:
$ jot -r 1 10000000 99999999
if you want to generate more than one number, just change the first parameter
$ jot -r 36 10000000 99999999 // Generates 36 Unique Numbers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With