the -e switch used with echo enables it to understand escape sequences as so:
[root@localhost~]# echo -e 'hello\b\bhi'
helhi
[root@localhost~]#
But, the escape sequences are seemingly skipped in the snippet below:
[root@localhost~]# echo -e 'hello\b\b'
hello
[root@localhost~]#
Can anyone help understand the behavior of the above code snippet?
When the same code snippet above, is executed in conjugation with the '-n' switch, it works! (ofcourse, with the -n behaviour where it removes the linefeed)
[root@localhost~]# echo -n -e 'hello\b\b'
hel[root@localhost~]#
Regards