How do I echo one or more tab characters using a bash script? When I run this code
res=\' \'x # res = \"\\t\\tx\" echo \'[\'$res\']\' # expect [\\t\\tx
echo -e ' \t '
will echo 'space tab space newline' (-e means 'enable interpretation of backslash escapes'):
-e
$ echo -e ' \t ' | hexdump -C 00000000 20 09 20 0a | . .|