In this command :
cut -f2 -d$'\t'
'\t') what is it mean ?
i saw it another question, i got the idea about "tab" delimiter but still want to know
'\t' shortcut or sign or command for something
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The horizontal tabulator character is a character that by default brings the cursor up to the next multiple of eight spaces when it's outputted.
$ printf '1234567*1234567*\na\thello\tthere\n' 1234567*1234567* a hello there
As you can see above, for each tab character, the cursor is forwarded to the next multiple of eight spaces.
The tab character is written as
\t in the C programming language. Printing a string containing
printf in the shell or with
printf() in C (and in many other places) produces a horizontal tab character in place of the two characters
$'...' is a special "C escape string". Within it, escape sequences like
\t (for tab) or
\n (for newline) are treated just like in
printf() in the C language. This is described in the
bash manual in the section titled "QUOTING".
cut -d $'\t' you tell
cut to use tab as the delimiter when cutting the fields of the input data. However, this happens to be the default delimiter that
cut will use if you don't use
-d at all, so
-d $'\t' is not needed in your command.