a Unix command line utility to filter stdin by column numbers
cat foo | nth <columns>
, each column being an integer index
cargo build --release
an opportunity to learn Rust, and to scratch a command line itch.
cut
works great for situations where the whitespace is fixed, e.g. a single space or single tab. nth
groups columns by whitespace regardless of length.
filtering by columns is a basic use case for awk, and having a separate tool to do so reduces the syntactic overhead of writing out commands. no more awk "{print $1, $2, $3}"
verbosity, instead just nth 1 2 3
.
WTFPL