hck is a close to drop in replacement for cut that can use a regex delimiter instead of a fixed string. Additionally this tool allows for specification of the order of the output columns using the same column selection syntax as cut (see below for examples).
No single feature of
hck on its own makes it stand out over
xsv or other such tools. Where
hck excels is making common things easy, such as reordering output fields, or splitting records on a weird delimiter.
It is meant to be simple and easy to use while exploring datasets.
- Reordering of output columns! i.e. if you use
-f4,2,8the output columns will appear in the order
- Delimiter treated as a regex (with
-R), i.e. you can split on multiple spaces without and extra pipe to
- Specification of output delimiter
- Selection of columns by header string literal with the
-Foption, or by regex by setting the
- Input files will be automatically decompressed if their file extension is recognizable and a local binary exists to perform the decompression (similar to ripgrep)
- Speed (see benchmarks in repo)
- Add some degree of column level filtering
- Explore parallel processing of input files