How do I make my backspace key functional in a bash script for Linux being accessed remotely from Windows?

user260467

I have a bash script on CentOS 7.4 with the following line that lets a user input a variable and then lets them confirm that what they entered is indeed correct:

read -p "Enter the name of the database: " dbname
echo "You entered: $dbname"
read -p "Is that correct? Enter y or n: " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1

When I SSH into the CentOS machine from Windows 10 with the Command Prompt app to run the script, sometimes I mistype a letter when inputting the variable and I need to backspace. However, when I try to backspace, the Command Prompt app just types out ^H.

How can I either modify my script or modify a setting somewhere in CentOS or Windows so that my backspace in this setup will actually be functional?

user260467

Turns out that Windows Command Prompt is just a bit wacky. Using PuTTY to SSH into the CentOS box, I can backspace for the read prompt without any issues.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I remotely view a Linux desktop from Windows XP?

From Dev

How can I prevent this script from being freely accessed?

From Dev

How can I prevent this script from being freely accessed?

From Dev

How do I make my bash script output data correctly?

From Dev

How do I execute a bash script on my Vagrant from PhpStorm on a Windows PC

From Dev

How do I get out my embedded Windows 8+ key from a Linux environment?

From Dev

How can I remotely control a linux box from my Mac?

From Dev

How do I stop a signal from killing my Bash script?

From Dev

How do I stop multiple line output from command substitution from being concatenated in BASH script?

From Dev

How do I create a single file from my HTML form and PHP script so that it is accessed from a pop-up Modal?

From Dev

How do I access my Windows administrative share from Linux?

From Dev

How do I share internet with Windows from my Linux box?

From Dev

How to make those values I get from my Linux script to become the values in my XML file

From Dev

How can I make my Super keys (Windows Key) behave more like Ctrl/Alt/Shift in Linux

From Dev

How do I make my windows "wavy"?

From Dev

BASH on Ubuntu on Windows (AKA Linux Subsystem for Windows) 10 - How do I set my PATH?

From Dev

How do I make my published web app that is installed on my IIS be accessed by another computer

From Dev

How do I make a bash script know the output of a CLI program it executed in Linux?

From Dev

How do I remap the caps lock key to the backspace key?

From Dev

How do I edit text remotely in Windows

From Dev

How do I block certain websites from being accessed through a browser?

From Dev

How can I make my computer do a repeated series of tasks by a script file on Windows?

From Dev

How do I handle hang from an ssh command from my bash script?

From Dev

How to protect my Javascript from being accessed by other parties?

From Dev

How to protect my Javascript from being accessed by other parties?

From Dev

How can I make a hybrid bash/tcsh script on Linux?

From Dev

How do I carry my variables from a Bash script into a Perl one?

From Dev

How do I carry my variables from a Bash script into a Perl one?

From Dev

UNIX: How do I make my script return the sum of the numbers passed to it from the command line?

Related Related

  1. 1

    How do I remotely view a Linux desktop from Windows XP?

  2. 2

    How can I prevent this script from being freely accessed?

  3. 3

    How can I prevent this script from being freely accessed?

  4. 4

    How do I make my bash script output data correctly?

  5. 5

    How do I execute a bash script on my Vagrant from PhpStorm on a Windows PC

  6. 6

    How do I get out my embedded Windows 8+ key from a Linux environment?

  7. 7

    How can I remotely control a linux box from my Mac?

  8. 8

    How do I stop a signal from killing my Bash script?

  9. 9

    How do I stop multiple line output from command substitution from being concatenated in BASH script?

  10. 10

    How do I create a single file from my HTML form and PHP script so that it is accessed from a pop-up Modal?

  11. 11

    How do I access my Windows administrative share from Linux?

  12. 12

    How do I share internet with Windows from my Linux box?

  13. 13

    How to make those values I get from my Linux script to become the values in my XML file

  14. 14

    How can I make my Super keys (Windows Key) behave more like Ctrl/Alt/Shift in Linux

  15. 15

    How do I make my windows "wavy"?

  16. 16

    BASH on Ubuntu on Windows (AKA Linux Subsystem for Windows) 10 - How do I set my PATH?

  17. 17

    How do I make my published web app that is installed on my IIS be accessed by another computer

  18. 18

    How do I make a bash script know the output of a CLI program it executed in Linux?

  19. 19

    How do I remap the caps lock key to the backspace key?

  20. 20

    How do I edit text remotely in Windows

  21. 21

    How do I block certain websites from being accessed through a browser?

  22. 22

    How can I make my computer do a repeated series of tasks by a script file on Windows?

  23. 23

    How do I handle hang from an ssh command from my bash script?

  24. 24

    How to protect my Javascript from being accessed by other parties?

  25. 25

    How to protect my Javascript from being accessed by other parties?

  26. 26

    How can I make a hybrid bash/tcsh script on Linux?

  27. 27

    How do I carry my variables from a Bash script into a Perl one?

  28. 28

    How do I carry my variables from a Bash script into a Perl one?

  29. 29

    UNIX: How do I make my script return the sum of the numbers passed to it from the command line?

HotTag

Archive