How to send a "backspace" character in Linux (UNIX)?

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76
I'm writing a shell script on Redhat, but for the life of me can't figure out how to send a backspace character from the script.

I think it's something like:

echo "testt\b"

where the "\b" should delete the extra letter/space/whatever.

Anyone know? I've searched on some websites, and for the life of me can't figure it out.
 

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76
That doesn't seem to work... or I'm using it wrong.

How would that be used in a command? I've tried echo -e "testt", echo "testt" -e, and neither seems to work.

And just for reference, I'm not really trying to delete an extra "t", but that's just my example.

Thanks!
 

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76
Now I've got it to work... I was just using it wrong. Thanks for the help EmperorRob!