December 2018
Beginner
320 pages
8h 57m
English
The cut command is used to display only specific columns or characters from a text file or from other command outputs. For example, in the following command, we display the login names from the /etc/passwd file:
$ cut -d: -f1 /etc/passwd
Output upon execution of the preceding command is shown in the following screenshot:

The following command line displays the first and third fields from a colon-delimited file (extra lines stripped from output):
$ cut -d: -f1,3 /etc/passwd
Output upon execution of the preceding command is shown in the following screenshot:
The following command line display only the first four characters of every ...
Read now
Unlock full access