Show the first column of a file

suggest change

Suppose you have a file that looks like this

John Smith 31
Robert Jones 27

This file has 3 columns separated by spaces. To select only the first column, do the following.

cut -d ' ' -f1 filename

Here the -d flag, specifies the delimiter, or what separates the records. The -f flag specifies the field or column number. This will display the following output


Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents