Here is an example of using cut to break input into fields using a space delimiter, and obtaining the second field.

cut -f2 -d' '

How do i define a delimiter as tab instead of space?

Best Answer


Two ways.

Press Ctrl + V and then Tab to use "verbatim" quoted insert .

cut -f2 -d'   ' infile

or write it like this to use ANSI-C quoting .

cut -f2 -d$'\t' infile