samples

Crates.iosamples
lib.rssamples
version1.0.5
sourcesrc
created_at2024-04-28 08:56:59.108988
updated_at2024-04-28 08:56:59.108988
descriptionsample lines from a text file(plain text, csv, log...) or from stdin
homepagehttps://github.com/zhangtaomox/samples
repositoryhttps://github.com/zhangtaomox/samples
max_upload_size
id1223105
size14,756
(zhangtaomox)

documentation

README

samples is a rust cli tool to sample lines from a text file(plain text, csv, log...) or from stdin

Installation

Cargo

cargo install samples

Manual

# download from github release
wget https://github.com/zhangtaomox/samples/releases/download/v1.0.5/samples-{YOUR PLATFORM}

Usage

# from stdin
echo "1\n2\n3\n4\n5" | samples -k 2
5
1
# from a file
samples -k 2 example.txt
# pipe
cat example.txt | samples -k 2 > output.txt

License

MIT or Apache-2.0

Commit count: 10

cargo fmt