Several ways to output tab characters in shell scripts
This article describes several ways to echo the tab character
\t in shell scripts, as well as other special symbols, such as new line
-e - enable interpretation of backslash escapes. For example.
echo -e '\t'
Words of the form
$'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard.
$'\t' to output the tab character Tab.
"" double quotes
echo "[$res]". Double quotes works in zsh, but fails in bash. For example.
printf function to format the output of the string.
value1="hello" value2="world" printf '%s\t%s\n' "$value1" "$value2“