2 unstable releases
0.2.0 | Jul 19, 2024 |
---|---|
0.1.0 | Jul 7, 2021 |
#487 in Command line utilities
63 downloads per month
7KB
131 lines
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 <num> Number of lines to read
ARGS:
<path> The path to the file to read
mod shuf
src/shuf.rs
contains a reusable implementation of reservior sampling, that works on any iterable.
Dependencies
~4MB
~70K SLoC