Shuffle

str_shuffle

Randomise the characters within each word of the input using a Knuth-Fisher-Yates shuffle. Single-character words are passed through unchanged. Note: Does not produce cryptographically secure output.

Arguments

  • ... (string): One or more words to shuffle

Exit codes

  • 0: Success
  • 1: Required dependencies (fold, paste, RANDOM) not found

Output on stdout

  • Space-separated shuffled words followed by a newline