hck is 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.
No single feature of hck on its own makes it stand out over awk, cut, 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. Think of this as filling a gap between cut and awk.
This is free and open source software.
Key Features
- Reordering of output columns! i.e. if you use -f4,2,8 the output columns will appear in the order 4, 2, 8.
- Delimiter treated as a regex, i.e. you can split on multiple spaces without and extra pipe to tr.
- Specification of output delimiter.
- Selection of columns by header string literal with the -F option, or by regex by setting the -r flag.
- Input files will be automatically decompressed if their file extension is recognizable and a local binary exists to perform the decompression (similar to ripgrep).
- Output can be gzip compressed using the multi-threaded compressors from gzp with -Z flag. This gzipped output is in BGZF format and can be indexed and queried with tabix.
- Exclude fields by index or by header.
- Speed.
Website: github.com/sstadick/hck
Support:
Developer: Seth Stadick
License: MIT License

hck is written in Rust. Learn Rust with our recommended free books and free tutorials.
Related Software
| Alternatives to cut | |
|---|---|
| hck | Drop-in replacement that can use a regex delimiter instead of a fixed string |
| tuc | Drop-in replacement for cut |
| choose | Human-friendly and fast alternative to cut |
| ccut | Colum's cut |
| cuts | Perl command-line utility |
| xcut | Extends the traditional Unix cut tool |
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.