Skip to Content
gnux

-d, --delimiter

Use DELIM instead of TAB for field delimiter.

An option of cutx.

Usage

cutx -d DELIM OPTION... [FILE]...
cutx --delimiter=DELIM OPTION... [FILE]...

Details

ShortLongValueDefaultMeaning
-d--delimiterDELIMuse DELIM instead of TAB for field delimiter

Examples

cutx -d : -f 1,7 /etc/passwd
cutx -d , -f 2-3 people.csv
cutx -d , -f 3- people.csv

Drop the second column, keeping the rest

cutx -d , -f 2 --complement people.csv

Convert a CSV file to TAB-separated output

cutx -d , -f 1- --output-delimiter=$'\t' people.csv

Join the selected columns with a custom separator

cutx -d : -f 1,3 --output-delimiter=' -> ' passwd.txt

Skip lines that contain no delimiter, such as comments

cutx -s -d = -f 2 settings.ini

Pull one field out of a command's output

echox 'key=value' | cutx -d = -f 2

Process NUL-separated records

cutx -z -d / -f 1 paths.lst

Help in the terminal

gnux help cutx --delimiter

On this page