Use the shuf command of linux to generate random permutations
This article will explain in detail the random arrangement of shuf commands using linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The shuf command randomly arranges the input and outputs it. The shuf command reads standard input when there is no file or when the file is -.
Syntax format: shuf [parameters]
Common parameters:
Reference example
Simulate the coin toss and get the top 10 results:
[root@linuxcool] # shuf-r-n 10-e "front"-e "negative" front and back
Simulated sports lottery super lottery:
[root@linuxcool] # shuf-I 1-35-n 5 | sort-n & & shuf-I 1-12-n 2 | sort-n417202931611 so much for the random permutation generated by using the linux shuf command. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.