shuf-rs

Shuffle lines of text with reservior sampling.

Build

cargo build --release

The resulting binary is found under target/release/shuf.

Usage

``` USAGE: shuf [OPTIONS] [path]

FLAGS: -h, --help Prints help information -V, --version Prints version information

OPTIONS: -n, --head-count=COUNT Number of lines to read

ARGS: The path to the file to read ```

mod shuf

src/shuf.rs contains a reusable implementation of reservior sampling, that works on any iterable.