🧀 Learn Linux

Commonly used · Reading and processing text

cut:Extract columns or characters

Put in free practice

Syntax

cut -d delimiter -f field [file]

Options

-d
single character separator
-f
Field number, list, or closed range
-c
Character number (teaching environment by character)

Examples

cut -d , -f 1 data/users.csv

Usage and sandbox support

Fields are numbered starting from 1. The default delimiter is Tab.

Hands-on exercises

Full documentation ↗

Related commands