tuc

github.com/riquito/tuc File Utilities Open-source projectOpen source

Select and format fields from text with tuc, a command-line alternative to cut.

github.com/riquito/tuc
tuc homepage screenshot

About tuc

tuc is a command-line tool that cuts text or bytes where a delimiter matches and keeps selected parts. It can select fields, characters, bytes, or lines using 1-indexed positions, ranges, negative indexes, and reordering, with text or regular-expression delimiters, delimiter replacement, and {} output formatting.

Input can come from stdin or a file. Memory use varies by mode: --bytes loads the whole input in memory, --lines can load the whole input with unordered or negative selections or with -p or -m, and --fixed-memory works only with single-byte delimiters, ascending fields, -z, -j, and -r.

Key features

  • Select fields with ranges, negative indexes, and reordering
  • Cut by bytes, characters, fields, or lines
  • Use text delimiter or regular expression as delimiter
  • Replace delimiter or format output with {} syntax
  • Output selected fields as JSON array of strings
  • Set fallback text for out-of-bound fields
Best for: People using the command line who need to select and rearrange text fields, characters, bytes, or lines.
Good for
  • Supports negative indexes, ranges, reordering, and {} output formatting
  • Can cut by fields, characters, bytes, or lines, including regex delimiters
  • Provides a WebAssembly playground to try without installing
Watch out for
  • --bytes allocates the whole input in memory
  • --lines allocates the whole input with unordered or negative fields, or with -p or -m
  • --fixed-memory works only with single-byte delimiters, ascending fields, -z, -j, -r

tuc at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

tuc alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in File Utilities

Well-known listings from the same topic.

All 184

tuc FAQ

How can I install tuc with cargo?
It requires rustc >= 1.85.0, then run cargo install tuc. Append --no-default-features for a smaller binary with no regex support.
Can I try tuc without installing it?
Yes, a WebAssembly version is available online as the tuc playground.
What happens when a requested field does not exist?
You can set a per-field fallback with = syntax, such as -f 1,8=fallback, or a generic fallback with --fallback-oob.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing