cut command is used to cut part of the text. We tell the cut what is the delimiter between the different part of the text and what field we want and it will print only the specific field.
The structure is:
cut -d <delimiter> -f <field-number> <file-name>
For example, in the passwd file, the second field is always x, and indeed:
oren@oren-computer:~/workspace/scripts/python $ cut -d : -f 2 /etc/passwd x x x x x x x
We can show more than one field, by using comma.
cut -d <delimiter> -f <field-number1>,<field-number2> <file-name>