SteelCore
October 17th, 2010, 08:19 AM
$ echo hi\tthere
hitthere
$echo "hi\tthere"
hi\tthere
In my understanding in the first command the backlash is an escape sequence which makes any special character after it lose their meaning, It is not really a character and therefore doesn't appear in the output.
In the second command, double quoting suppresses expansions but not backlashes so its special meaning holds. Then why does it appear in the output?
Thanks for any help.
hitthere
$echo "hi\tthere"
hi\tthere
In my understanding in the first command the backlash is an escape sequence which makes any special character after it lose their meaning, It is not really a character and therefore doesn't appear in the output.
In the second command, double quoting suppresses expansions but not backlashes so its special meaning holds. Then why does it appear in the output?
Thanks for any help.