A Unix shell command that breaks input into fields, which can be selected for output, based on a delimiter.
cut
is often the easiest way to split input lines or to extract only parts from them. If the rule how to split a line into fields can be expressed with a single character, cut
should be used insead of the more powerful tools sed
or awk
.
cut
can select fixed ranges from the input line, be they bytes or characters.
The perfect match for cut
is, of course, paste.
For Prolog's cut, see prolog-cut
In scientific software r for statistical computing and graphics, the function cut
partitions elements of a numeric vector into bins.