- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script ignores every other key press
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 03:27 AM
10-04-2002 03:27 AM
I have written the attached script which enables our user management to team to add/remove/modify entries in a file. I have written a pretty simple menu system which prompts for a menu number and does a 'case' on the response. This works fine and I have tested each module OK. The problem I have is, after adding a user, the terminal seems to ignore every other key press i.e I have to hit Enter twice to continue and if I wanted to enter TONY as the next name I'd have to type TTOONNYY. This only seems to happen after one module has run once, if a stop and start the script - no problem. Any thoughts suggestions would be most appreciated.
Cheers,
Ton
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 03:46 AM
10-04-2002 03:46 AM
Re: Script ignores every other key press
stty -g >tmpfile
Later you can restore them using
stty $(cat tmpfile)
To find the root cause you may compare the stty -a results before and after...
Regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 05:00 AM
10-04-2002 05:00 AM
Re: Script ignores every other key press
The line:
awk -F: '{print $1}' $PASSWD|grep -q ^$CHECK /etc/passwd
doesn't look right. Where is PASSWD defined? And the code before the pipe is irrelevant anyway, as you're not doing anything with the output.
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 05:33 AM
10-04-2002 05:33 AM
Re: Script ignores every other key press
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 06:18 AM
10-04-2002 06:18 AM
Re: Script ignores every other key press
PLUS, you need to RETAIN the variable (a line in the WID file)
NEW_USER #
otherwise the next user added gets SQUAT (/dev/null, "", '', nil, ...) for an ID
If ever there was a need to write a program in perl, this is without a doubt one of them!
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 06:33 AM
10-04-2002 06:33 AM
Re: Script ignores every other key press
NEW_USER 02
NEW_USER 32
NEW_USER A2
The script just replaces the first instance with a username and more are added manually as needed (I'm still trying to get to grips with the ageing policies here).
This does appear to have fixed the problem(!). Can you tell me why??
Thanks
Tony (need to learn Perl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 06:37 AM
10-04-2002 06:37 AM
SolutionHave you thought about doing this in perl?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2002 06:50 AM
10-04-2002 06:50 AM