- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to identify keys for validations?
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-13-2002 03:03 AM
10-13-2002 03:03 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2002 05:25 AM
10-13-2002 05:25 AM
Re: How to identify keys for validations?
Try this link
http://www.fnal.gov/docs/UNIX/unix_at_fermilab/htmldoc/rev1997/uatf-14.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2002 08:24 AM
10-13-2002 08:24 AM
Re: How to identify keys for validations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2002 02:39 PM
10-13-2002 02:39 PM
SolutionBut to make things quite complicated, there are hundreds of terminals, the majority being incompatible with each other. And to really muddy the problem even more, PC's look like terminals (keyboard and screen) but they can't act like a terminal without special software (called an emulator). The Windows' program Hyperterminal is an imitation terminal (and not a very good one at that).
Since you'll never be able to code for all the terminals that might be used with your script, there is an excellent library to help: Curses, and for shell scripts, tput is the key command. Read the man pages for: tput and terminfo
Note: Very few people use the Bourne shell today on HP-UX. The Bourne shell is started with: /usr/old/bin/sh but the standard shell on HP-UX is the POSIX shell which is /usr/bin/sh and /sbin/sh. A POSIX shell meets the POSIX standards and shells such as Korn (ksh) or BASH and HP's POSIX shell.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2002 04:06 PM
10-13-2002 04:06 PM
Re: How to identify keys for validations?
if test $a -eq "041" then
is it something like this, but i worried the shell will treat it as a normal number 041. Any solutions for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2002 04:11 PM
10-13-2002 04:11 PM
Re: How to identify keys for validations?
tput bold
tput blink
tput rev
Can tput do more than that? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2002 07:38 PM
10-13-2002 07:38 PM
Re: How to identify keys for validations?
As for your question, the test would be made for plain ACII characters like this:
if test $a = "!"
or
if [ $a = "!" ]
Use the numeric value when there is no displayable character avaliable on the keyboard, and then the form would be:
if [ $a = "\014" ]
which tells the shell to substitute the appropriate ASCII character for \014.
Bill Hassell, sysadmin