2020-05-18 09:13:03 +02:00
|
|
|
# shuffle
|
|
|
|
|
|
|
|
Shuffles the rows in a random order.
|
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
## Examples
|
2020-05-18 09:13:03 +02:00
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
Passing the same input to shuffle multiple times gives different results -
|
2020-05-18 09:13:03 +02:00
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
```shell
|
|
|
|
> echo [ a b c d ] | shuffle
|
2020-05-18 09:13:03 +02:00
|
|
|
───┬───
|
2020-06-23 20:21:47 +02:00
|
|
|
0 │ a
|
|
|
|
1 │ c
|
|
|
|
2 │ d
|
|
|
|
3 │ b
|
2020-05-18 09:13:03 +02:00
|
|
|
───┴───
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
2020-05-18 09:13:03 +02:00
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
```shell
|
|
|
|
> echo [ a b c d ] | shuffle
|
2020-05-18 09:13:03 +02:00
|
|
|
───┬───
|
2020-06-23 20:21:47 +02:00
|
|
|
0 │ c
|
|
|
|
1 │ b
|
|
|
|
2 │ d
|
|
|
|
3 │ a
|
2020-05-18 09:13:03 +02:00
|
|
|
───┴───
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
2020-05-18 09:13:03 +02:00
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
```shell
|
|
|
|
> echo [ a b c d ] | shuffle
|
2020-05-18 09:13:03 +02:00
|
|
|
───┬───
|
2020-06-23 20:21:47 +02:00
|
|
|
0 │ c
|
|
|
|
1 │ b
|
|
|
|
2 │ a
|
|
|
|
3 │ d
|
2020-05-18 09:13:03 +02:00
|
|
|
───┴───
|
|
|
|
```
|