Randomly pick N characters from a given string(or standard input), just like rolling a dice repeatedly, then concatenate them into a single string.
Please note that:
- It might containe repeated items. If you want to just shuffle them, try removing
-r
option fromshuf
command. - It will treat unicode character as one item. see below: