#cli #line #random #testing #output #prefix #exit

bin+lib random-output

Output random lines to stdout and stderr

3 unstable releases

0.3.1 Nov 13, 2024
0.3.0 Feb 14, 2023
0.2.0 Feb 13, 2023

#15 in #exit

Download history 6/week @ 2024-09-19 2/week @ 2024-09-26 58/week @ 2024-11-07 60/week @ 2024-11-14 6/week @ 2024-11-21

124 downloads per month

MIT/Apache and GPL-3.0-only

13KB
297 lines

random-output

Outputs random lines to stdout and stderr. Useful for tests for shell scripts and automations.

USAGE:
    random-output.exe [OPTIONS]

OPTIONS:
    -c, --color                      Make dates gray, [INFO] green and [ERR] red
    -d, --date                       Show dates in [%yyyy-%mm-%dd %HH:%MM:%SS.%3f] style
    -e <STDERR_LINES>                Number of stderr lines [default: 10]
        --exit <EXIT_CODE>           Exit code of the process [default: 0]
    -h, --help                       Print help information
    -l, --level                      Show [INFO] for stdout and [ERR] for stderr
    -n <STDOUT_LINES>                Number of stdout lines [default: 10]
        --prefix <PREFIX>            Prefix to add each line [default: ]
        --prefix-err <PREFIX_ERR>    Prefix to add each stderr line. Defaults to `--prefix`
        --suffix <SUFFIX>            Suffix to add each line [default: ]
        --suffix-err <SUFFIX_ERR>    Suffix to add each stderr line. Defaults to `--suffix`
    -V, --version                    Print version information
    -w, --working-dir                Show working dir in the first line
        --wait <WAIT_MS>             Specify how long to wait between outputs in <ms> [default: 0]

Dependencies

~5–14MB
~184K SLoC