From f4946b78d236deae99162f6ea35a5d359597f619 Mon Sep 17 00:00:00 2001 From: Like-all Date: Mon, 8 Sep 2014 13:27:44 +0400 Subject: [PATCH] linux: shuf --- pages/linux/shuf.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/linux/shuf.md diff --git a/pages/linux/shuf.md b/pages/linux/shuf.md new file mode 100644 index 0000000000..bdb66630d3 --- /dev/null +++ b/pages/linux/shuf.md @@ -0,0 +1,19 @@ +# shuf + +> generate random permutations + +- randomize strings position in file + +`shuf {{filename}}` + +- generate random numbers in range + +`shuf -i LO-HI` + +- take first n results from output + +`shuf -n {{n}} {{filename}}` + +- write output to another file + +`shuf -o {{another_filename}} {{filename}}`