~/cut(1)
en
NAME
cut - take a field or a column out of every line
SYNOPSIS
cut -f list [-d delimiter] [file ...]
DESCRIPTION
Takes the same piece out of every line. cut -d: -f1 /etc/passwd is the
honest way to list the users on this machine, and the reason /etc/passwd is
world-readable.
A line with no delimiter in it comes through whole, which is what cut does with one.
OPTIONS
- -f list
- which fields, counted from 1, separated by commas
- -d delimiter
- what separates them (a tab, unless you say)
- -c list
- characters rather than fields
EXAMPLES
map[cut -d:-f1 /etc/passwd]
map[cut -d:-f1,6 /etc/passwd]
ls -l | cut -c1-10