CentOS Stream 9
Sponsored Link

Commands Help

Command :   Back to index

cut : remove sections from each line of files
[SYNOPSIS] cut OPTION FILE
OPTION
-c LIST select only these characters
# cut -c'1-5' /etc/passwd
Extract characters 1 to 5 of /etc/passwd
-d DELIM use DELIM instead of TAB for field delimiter
# cut -d':' -f3 /etc/passwd
Extract the third field from /etc/passwd separated by ':'
-f LIST select only these fields
# cut -d':' -f4,5 /etc/passwd
Extract 4th-5th fields of /etc/passwd

Matched Content