I want to know if it is possible with the cut option to indicate the delimiter with a line break "\n" or "\t".
Ex: cut -f 1 -d "\t". This line gives me error.
I want to know if it is possible with the cut option to indicate the delimiter with a line break "\n" or "\t".
Ex: cut -f 1 -d "\t". This line gives me error.
Unlike with e.g. tr, you cannot pass \t or \n directly to cut. You need ANSI-C quoting style.
You can use $'\n' or $'\t' as delimiter.
Note, that tab is the default delimiter for cut, so you can omit setting the delimiter.