From 1d781e8797f7bafadd90ea8e51c0cd8e51dfb61d Mon Sep 17 00:00:00 2001 From: Shaurya Shubham Date: Mon, 18 May 2020 12:43:03 +0530 Subject: [PATCH] Add docs for the shuffle command (#1824) --- docs/commands/shuffle.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/commands/shuffle.md diff --git a/docs/commands/shuffle.md b/docs/commands/shuffle.md new file mode 100644 index 000000000..531dc07da --- /dev/null +++ b/docs/commands/shuffle.md @@ -0,0 +1,33 @@ +# 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 +───┴─── +```