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
\bescape causes a backspace+delete rather than just a backspace (reposition cursor) ? – user4556274 Jun 13 '20 at 11:43UNIXcertified platform,-eis printed as the firstechoargument. – schily Jun 13 '20 at 11:58UNIXcertified platforms, evenbashis compiled in a way that makedit behave conformant. CheckMacOSorSolaris... – schily Jun 13 '20 at 12:04-esee https://unix.stackexchange.com/q/65803/5132 and https://unix.stackexchange.com/q/55101/5132 . – JdeBP Jun 13 '20 at 15:57