A human-friendly and fast alternative to cut (and sometimes awk)
A human-friendly and fast alternative to cut (and sometimes awk)
This is choose, a human-friendly and fast alternative to cut and (sometimes) awk
cut for sufficiently long inputs, much faster than
awkThe AWK programming language is designed for text processing and is extremely
capable in this endeavor. However, the awk command is not ideal for rapid
shell use, with its requisite quoting of a line wrapped in curly braces, even
for the simplest of programs:
awk '{print $1}'Likewise, cut is far from ideal for rapid shell use, because of its confusing
syntax. Field separators and ranges are just plain difficult to get right on the
first try.
It is for these reasons that I present to you choose. It is not meant to be a
drop-in or complete replacement for either of the aforementioned tools, but
rather a simple and intuitive tool to reach for when the basics of awk or
cut will do, but the overhead of getting them to behave should not be
necessary.
Please see our guidelines in contributing.md.
……In order to build choose you will need the rust toolchain installed. You can
find instructions here.
Then, to install:
git clone https://github.com/theryangeary/choose.git
cd choose
cargo build --release
install target/release/choose <DESTDIR>Just make sure DESTDIR is in your path.
Cargo:
cargo install chooseArch Linux:
yay -S choose-rust-gitFedora/CentOS COPR:
dnf copr enable atim/choose
dnf install chooseHomebrew:
brew install choose-rustMacPorts:
sudo port install chooseSee benchmarking
No open issues yet, or sync has not completed.