coreutils

tuc – drop-in replacement for cut

The GNU Core Utilities or coreutils is a package of GNU software containing implementations for many of the basic tools, such as cat, ls, and rm, which are used on Unix-like operating systems.

Every day, we use many command-line tools to manage our systems, and perform basic tasks. Many of the programs provided by coreutils are staples in our daily life. Over the years, these tools have been updated and ported to other systems, but they still retain many of their original traits.

cut is one of the many utilities included with coreutils. cut writes to standard output selected parts of each line of each input file, or standard input. This lets us extract elements by defining ranges, delimiting characters and bytes. It’s not as widely known as some of its counterparts but it can still be a useful and practical command-line utility. cut doesn’t offer sophisticated field processing, like reordering fields, and handling fields aligned with blank characters.

tuc is a similar tool to cut but offers additional functionality. It allows us to split text or bytes into parts and reassemble them in any order. Parts can be referenced by negative indexes, and delimiters can be any number of characters long. It is particularly strong at extracting data from comma-separated lists.

Help information for the tuc utility

Summary

tuc is a more powerful replacement for cut. It’s just reached it’s 1.0.0 release with this release having the regex feature enabled by default for the first time. The developer now provides tuc-lite which is tuc without regex support..

The project provides pre-built binaries for Linux (Ubuntu), macOS, and Windows. But it’s trivial to compile the source code.

Website: github.com/riquito/tuc
Support:
Developer: Riccardo Attilio Galli
License: GNU General Public License version 3.0

tuc is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Alternatives to cut
hckDrop-in replacement that can use a regex delimiter instead of a fixed string
tucDrop-in replacement for cut
chooseHuman-friendly and fast alternative to cut
ccutColum's cut
cutsPerl command-line utility
xcutExtends the traditional Unix cut tool

Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted