Unable to correct typing mistake from the console.

C

Choowie

Hi there,

I have a Perl script which I launch from a serial port console. The scripts
asks for a bunch of questions and then modifies configuration scripts. I use
the <STDIN> functionnality to read what the user typed in.

The problem is, when in serial console, I must not do any typing mistake.
The Delete of Ctrl-H key do not operate.

What should I do to have these keys working?

Thanx for your help.
 
J

John W. Krahn

Choowie said:
Hi there,

I have a Perl script which I launch from a serial port console. The scripts
asks for a bunch of questions and then modifies configuration scripts. I use
the <STDIN> functionnality to read what the user typed in.

The problem is, when in serial console, I must not do any typing mistake.
The Delete of Ctrl-H key do not operate.

What should I do to have these keys working?

You need to set the erase character correctly for your terminal using stty.

man stty


John
 
C

Choowie

John said:
You need to set the erase character correctly for your terminal using
stty.

man stty

IMHO, the stty is set correctly. The Delete or Ctrl-H key work perfectly in
shell. It just doesn't work anymore within the Perl script. Do you think I
would still need to investigate on stty?
 
C

Choowie

Choowie said:
IMHO, the stty is set correctly. The Delete or Ctrl-H key work
perfectly in shell. It just doesn't work anymore within the Perl
script. Do you think I would still need to investigate on stty?

I did investigate further more. You were right
The trick is to have a "stty -F /dev/ttyS0 erase ^h"

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top