Linux from the command line -- Mixing it up with the shuf command
The bash shell is very powerful and the plethora of commands it provides can be combined into scripts as powerful as full on applications. The shuf command is an example of a tool you might use to build such a powerful script.
Make sure to check out the "sort" command too, it's the ying to shuf's yang.
They will also both teach you why you should use leading zero's instead of the way it's done in the shuf demo. For example, where the demo uses
line1
line2
.
.
.
line10
You should use
line01
line02
.
.
.
line10
Play with shuf and sort to see why.
https://www.ostechnix.com/the-shuf-command-tutorial-with-examples-for-beginners/
No comments:
Post a Comment