Glam Prestige Journal

Bright entertainment trends with youth appeal.

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.

1 Answer

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.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy