From 786e90e86414587cdc62fe42675009b4f973da33 Mon Sep 17 00:00:00 2001 From: Like-all Date: Mon, 25 Aug 2014 14:50:27 +0400 Subject: [PATCH 1/4] mdadm: mistype fix --- pages/linux/mdadm.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/linux/mdadm.md b/pages/linux/mdadm.md index 783117baa..c089b248a 100644 --- a/pages/linux/mdadm.md +++ b/pages/linux/mdadm.md @@ -12,15 +12,15 @@ - mark disk as failed -`mdadm {{/path/to/raid_device_file}} -f {/path/to/disk_device_file{}}` +`mdadm {{/path/to/raid_device_file}} -f {{/path/to/disk_device_file}}` - remove disk -`mdadm {{/path/to/raid_device_file}} -r {/path/to/disk_device_file{}}` +`mdadm {{/path/to/raid_device_file}} -r {{/path/to/disk_device_file}}` - add disk to array -`mdadm {{/path/to/raid_device_file}} -a {/path/to/disk_device_file{}}` +`mdadm {{/path/to/raid_device_file}} -a {{/path/to/disk_device_file}}` - show RAID info From f4946b78d236deae99162f6ea35a5d359597f619 Mon Sep 17 00:00:00 2001 From: Like-all Date: Mon, 8 Sep 2014 13:27:44 +0400 Subject: [PATCH 2/4] 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 000000000..bdb66630d --- /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}}` From 1089ebb83792fefa83661ebabed77d6f9ff62918 Mon Sep 17 00:00:00 2001 From: Like-all Date: Wed, 10 Sep 2014 13:48:17 +0400 Subject: [PATCH 3/4] shuf: range description fix --- pages/linux/shuf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/shuf.md b/pages/linux/shuf.md index bdb66630d..f2cda31bd 100644 --- a/pages/linux/shuf.md +++ b/pages/linux/shuf.md @@ -8,7 +8,7 @@ - generate random numbers in range -`shuf -i LO-HI` +`shuf -i {{low}}-{{high}}` - take first n results from output From 53750372c5261cc3ab66a4da64b76acf8e1d3a93 Mon Sep 17 00:00:00 2001 From: Like-all Date: Wed, 10 Sep 2014 17:58:31 +0400 Subject: [PATCH 4/4] shuf: suggestions --- pages/linux/shuf.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/linux/shuf.md b/pages/linux/shuf.md index f2cda31bd..bdf3e75bb 100644 --- a/pages/linux/shuf.md +++ b/pages/linux/shuf.md @@ -2,18 +2,18 @@ > generate random permutations -- randomize strings position in file +- randomize the order of lines in a file and output the result `shuf {{filename}}` -- generate random numbers in range - -`shuf -i {{low}}-{{high}}` - -- take first n results from output +- only output the first n entries of the result `shuf -n {{n}} {{filename}}` - write output to another file `shuf -o {{another_filename}} {{filename}}` + +- generate random numbers in range + +`shuf -i {{low}}-{{high}}`