We may need to cut text by column rather than row. Let's assume that we have a text file containing student reports with columns, such as
Percentage. We need to extract only the name of students to another file or any n-th column in the file or extract two or more columns. This recipe will illustrate how to perform this task.
cut is a small utility that often comes to our help for cutting in column fashion. It can also specify the delimiter that separates each column. In
cut terminology, each column is known as a field.
In order to extract the first field or column, use the following syntax:
cut -f FIELD_LIST filename
FIELD_LIST is a list of columns that are ...