| Crates.io | samples |
| lib.rs | samples |
| version | 1.0.5 |
| created_at | 2024-04-28 08:56:59.108988+00 |
| updated_at | 2024-04-28 08:56:59.108988+00 |
| description | sample lines from a text file(plain text, csv, log...) or from stdin |
| homepage | https://github.com/zhangtaomox/samples |
| repository | https://github.com/zhangtaomox/samples |
| max_upload_size | |
| id | 1223105 |
| size | 14,756 |
samples is a rust cli tool to sample lines from a text file(plain text, csv, log...) or from stdin
cargo install samples
# download from github release
wget https://github.com/zhangtaomox/samples/releases/download/v1.0.5/samples-{YOUR PLATFORM}
# 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
MIT or Apache-2.0