For testing purposes, I usually create a series of files to run my bash scripts against and I love using the
1 2 3
Awesome! This allows me to:
jot 8 | xargs touch
I also use it to generate random series of numbers:
jot -r 10
What if you want to specify a range of numbers to which the randomisation occur?
jot -r 10 580 900
The above gives you 10 random numbers between 580 to 900. Awesome, right? Then there’s more - you can prepend a word to it!
jot -w file_%d -r 10 580 900
Like I said, I love the
jot command. There’s a lot more use of this nifty little command. I only cover those I use often.
For the rest of it, you can go through the tutorial here.