Skip to content

Cut

Cut by Delimiter (-d) and Field (-f)

echo 'hello new world' | cut -d ' ' -f 2-3

Output:

new world

Indexing by Character (-c)

echo 'hello new world' | cut -c [7-9]

Output:

new