cut — Cut Out Selected Fields of Each Line of a File

Synopsis

/usr/bin/cut -blist [-n] [file...] 
/usr/bin/cut -clist [file ...] 
/usr/bin/cut -flist [-ddelim] [-s] [file...] 

Description

Use cut to cut out columns from a table or fields from each line of a file; in database parlance, cut implements the projection of a relation. The fields as specified by list can be fixed length, that is, character positions as on a punched card (-c option), or the length can vary from line to line and be marked with a field delimiter character like Tab (-f option). You can use cut as a filter.

Note

You must specify the -b, -c, or -f option.

Use grep(1) to make horizontal cuts (by context) through a file, or paste(1) to put files together column-wise (that ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.