Testing for correct user input from keyboard


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Testing for correct user input from keyboard
# 1  
Old 11-29-2009
Java Testing for correct user input from keyboard

What script can I use to catch errors in a shell script if user inputs alpha numeric characters instead on integers from the keyboard?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Keyboard User Input in awk language ?

Hi, does someone know how to make a keyboard data input in the AWK programming language ? Regards Zabo (6 Replies)
Discussion started by: Zabo
6 Replies

2. Shell Programming and Scripting

Read input from Keyboard, do not proceed if no input

Hi, I am working on a script, which requests users to enter input. Ex: read -p "Please enter your email id:" email I don't want users skipping this entry, this has to be mandatory.I dont want to proceed without input. I can do a check if variable $email is empty and proceed if not.But, i... (7 Replies)
Discussion started by: aravindadla
7 Replies

3. Shell Programming and Scripting

How to get input from keyboard with watch?

Hello, i`m trying to create an network monitoring script and i dont know how to make affect that script by pressing an key from keyboard and that script runs not in while or for or any other loop, but with bash command watch for example: i have created an file (for example check) with content... (0 Replies)
Discussion started by: bacarrdy
0 Replies

4. Shell Programming and Scripting

[Solved] Testing Data Type of User Input

hi all i'm new in shell scripting and now i'm working on project and i wanna make a function take input from user and test it's datatype then if correct write it to file i wounder what is the best way to do this ? can i use awk ? edit by bakunin: Please give your threads a meaningful... (5 Replies)
Discussion started by: mohamed91
5 Replies

5. Homework & Coursework Questions

How to read user keyboard input inside the case?

I need to Write a shell script that allows some system-administration tasks to be preformed automatically from a menu-driven interface. with automated following tasks: Copy directory tree Delete files or directories Output Information (this part is done ) *Copy directory tree The “Copy... (2 Replies)
Discussion started by: femchi
2 Replies

6. Shell Programming and Scripting

sed execution with input from keyboard

> sed '' Hello hi Hello output How hi output ^D How > sed should take each line as input, process and output the result. In the above scenario the input is passed from keyboard and the output of 'Hello' as you can see is displayed on the screen after 'hi' is passed as input but not as... (1 Reply)
Discussion started by: loggedin.ksh
1 Replies

7. Shell Programming and Scripting

Keyboard input question

How would I change up a script that currently has something like: bash script echo what's 1 2 3 4? then using read 1 2 3 4 I type 1 2 3 4. so in the script i can do stuff like echo $1 $2 $3 $4 and such... i was just doing echo "1 2 3 4"|bash script But was wondering how could I... (5 Replies)
Discussion started by: biopulse
5 Replies

8. Shell Programming and Scripting

Loop until user input is correct

Hello, i know how to retrieve a user input (read), and how to manage the different options (case statement). But... could anybody show me a script that, if the user option is incorrect, don't allow to continue the excution, i.e., if the value entered is not 1 or 2, the script shows a question. ... (2 Replies)
Discussion started by: aristegui
2 Replies

9. Programming

Keyboard Input

Does anyone know how do you determine the user idle time of STDIN in order to log the user out for being idle too long. I would like to write a c program to do this but I it is not clear upon how to determine idle time from keyboard input. I have found that the "who.c" source file uses the last... (4 Replies)
Discussion started by: cpaquette
4 Replies

10. Shell Programming and Scripting

suppressing keyboard input

Setup Info: This User Id and Password mention below are being used with the ISQL command to connect to a sybase database so they are likely to not be the same as those that were signed on from the session. Situation: Using a korn shell, the shell prompts for a User Id and Password. During the... (1 Reply)
Discussion started by: anthreedhr
1 Replies
Login or Register to Ask a Question
XkbGetGeometry(3)						   XKB FUNCTIONS						 XkbGetGeometry(3)

NAME
XkbGetGeometry - Loads a keyboard geometry if you already have the keyboard description SYNOPSIS
Status XkbGetGeometry (Display *dpy, XkbDescPtr xkb); ARGUMENTS
- dpy connection to the X server - xkb keyboard description that contains the ID for the keyboard and into which the geometry should be loaded DESCRIPTION
You can load a keyboard geometry as part of the keyboard description returned by XkbGetKeyboard. However, if a keyboard description has been previously loaded, you can instead obtain the geometry by calling the XkbGetGeometry. In this case, the geometry returned is the one associated with the keyboard whose device ID is contained in the keyboard description. XkbGetGeometry can return BadValue, BadImplementation, BadName, BadAlloc, or BadLength errors or Success if it succeeds. DIAGNOSTICS
BadAlloc Unable to allocate storage BadImplementation Invalid reply from server BadLength The length of a request is shorter or longer than that required to minimally contain the arguments BadName A font or color of the specified name does not exist BadValue An argument is out of range SEE ALSO
XkbGetKeyboard(3) X Version 11 libX11 1.6.0 XkbGetGeometry(3)