cutp is a semi-complete implementation of the cut tool in Perl using Perl regular expressions, which attempts to be command-line compatible with GNU cut. It handles most of what GNU cut supports, though the output is a little bit different (mainly in the placement of delimiters).

Of course, like grepp, you might be asking “good god WHY??”. Well, I wanted to cut on a regex. GNU cut wouldn’t do it, and so I was stuck writing a Perl or Awk script. So, I thought, why not just write a Perl ‘cut’ that I could expand as I need it (not unlike grepp). And so cutp was borne.

Anyway, cutp provides the following features over GNU cut:

  • Regular expression splitting using the ‘-r’ flag.
  • Handles multiple delimiter/regexs, and combinations thereof (delimiters are processed before regexs).