Merge pull request #4421 from chenchiii/shuf-move-help-strings-to-md-file

shuf: move help strings to markdown file
This commit is contained in:
Sylvestre Ledru
2023-02-23 09:29:32 +01:00
committed by GitHub
2 changed files with 14 additions and 9 deletions
+11
View File
@@ -0,0 +1,11 @@
# shuf
```
shuf [OPTION]... [FILE]
shuf -e [OPTION]... [ARG]...
shuf -i LO-HI [OPTION]...;
```
Shuffle the input by outputting a random permutation of input lines.
Each output permutation is equally likely.
With no FILE, or when FILE is -, read standard input.
+3 -9
View File
@@ -15,7 +15,7 @@ use std::fs::File;
use std::io::{stdin, stdout, BufReader, BufWriter, Read, Write};
use uucore::display::Quotable;
use uucore::error::{FromIo, UResult, USimpleError};
use uucore::format_usage;
use uucore::{format_usage, help_about, help_usage};
mod rand_read_adapter;
@@ -25,14 +25,8 @@ enum Mode {
InputRange((usize, usize)),
}
static USAGE: &str = "\
{} [OPTION]... [FILE]
{} -e [OPTION]... [ARG]...
{} -i LO-HI [OPTION]...";
static ABOUT: &str = "\
Shuffle the input by outputting a random permutation of input lines. \
Each output permutation is equally likely. \
With no FILE, or when FILE is -, read standard input.";
static USAGE: &str = help_usage!("shuf.md");
static ABOUT: &str = help_about!("shuf.md");
struct Options {
head_count: usize,