nushell/docs/commands/shuffle.md
2020-05-18 19:13:03 +12:00

34 lines
503 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# shuffle
Shuffles the rows in a random order.
## Examples -
Passing the same input to shuffle multiple times gives different results -
```
echo [ a b c d ] | shuffle
───┬───
0 │ a
1 │ c
2 │ d
3 │ b
───┴───
echo [ a b c d ] | shuffle
───┬───
0 │ c
1 │ b
2 │ d
3 │ a
───┴───
echo [ a b c d ] | shuffle
───┬───
0 │ c
1 │ b
2 │ a
3 │ d
───┴───
```