I'm running very simple script which reads line by line and prints entered line back to terminal:
while read CMD; do
echo $CMD
done
It works fine, but when I'm trying to edit line with backspace
character it prints ^?
instead of deleting character. And when I press Ctrl
+ backspace
the output is ^H
. How could this behavior be fixed so backspace
removes character instead of adding these characters?
I tried stty erase '^?'
command but not successfully.
read CMD
byread -e CMD
.terminator
instead ofgnome-terminal
. Its working as expected-e
option. But on @vrom911's machine it's not the case. I wonder why it happens and where this can be configured.