here 'n' is the default value.that means if the user press ENTER key then it should be 'n' .
No
Quote:
Originally Posted by sars
Now how do i know that the user has pressed ENTER key.What will be stored in my variable 'ans'.
ans will contain what you typed until the enter key was pressed. If you only press enter, then that variable will be empty.
To do what you want, you need to do something like:
without pressing the enter key ..manually...
how can we read the enter key ..from the shell script..so that the script termintes automatically.
eg:
telnet a.b.c.d xxxx
now " how to read the enter key" tho terminate the script (1 Reply)
Hello All,
i have a script to get input from the user like bellow,
read -p "Do you want to continue (y/n) : " status
i want to identify the pressing of Enter Key with out giving any value for the above statement and i want get the status if we press Enter key during run time.
How to... (0 Replies)
i have script like:
echo "enter name"
read a
I do not want to press enter key
i have tried with ascill of enter as (\013) but still it wait for enter ,
please resolve my problem (2 Replies)
Hi,
When I run script on Sun Solaris (sassetup), it prompts to "Press Enter To Continue".
Now I want to automate this, ie put sassetup in a script file. So, when I run this file, it should be executed automatically without waiting for anyone to press Enter Key.
I have tried the following... (1 Reply)
My problem is that i have to connect Linux server. I can connect it with SSH but because of the software of the Linux server, i need to press enter and after ctrl+D. Therefore, I need to write a script that should press enter and ctrl+D. How can i write it in KSH shell script. HELP ME! (7 Replies)
Hi Experts,
I have a script in which I want to disable the "Enter" key press. Actually my script executes some process in background. So, till that background process is running, I don't want "Enter" key to be pressed by user. Is this can be achieved using trap command? (6 Replies)
I'm working in a UNIX box that's owned by a vendor. They have it set up by State, meaning when I need to program script related to certain States, I type in, for example, "CA", it goes to a whole other terminal:
ddqsw:pts/2:login
miller CA
TERM = ( vt100 )
When I do this I have to hit... (7 Replies)
I have a popup window that appears on every boot up.
I would like to have it dismissed automatically each time instead of having to hit the enter key.
I thought I could write a script that would execute on startup.
I tried this
xdotool key return
andy@7_~/Downloads$ xdotool key ... (7 Replies)
Discussion started by: drew77
7 Replies
LEARN ABOUT ULTRIX
hdestroy
hsearch(3) Library Functions Manual hsearch(3)Name
hsearch, hcreate, hdestroy - manage hash search tables
Syntax
#include <search.h>
ENTRY *hsearch (item, action)
ENTRY item;
ACTION action;
int hcreate (nel)
unsigned nel;
void hdestroy ( )
Description
The subroutine is a hash-table search routine generalized from Knuth (6.4) Algorithm D. It returns a pointer into a hash table indicating
the location at which an entry can be found. The item is a structure of type ENTRY (defined in the <search.h> header file) containing two
pointers: item.key points to the comparison key, and item.data points to any other data to be associated with that key. (Pointers to types
other than character should be cast to pointer-to-character.) The action is a member of an enumeration type ACTION indicating the disposi-
tion of the entry if it cannot be found in the table. ENTER indicates that the item should be inserted in the table at an appropriate
point. FIND indicates that no entry should be made. Unsuccessful resolution is indicated by the return of a NULL pointer.
The subroutine allocates sufficient space for the table, and must be called before is used. The nel is an estimate of the maximum number
of entries that the table will contain. This number may be adjusted upward by the algorithm in order to obtain certain mathematically
favorable circumstances.
The subroutine destroys the search table, and may be followed by another call to
Restrictions
Only one hash search table may be active at any given time.
Diagnostics
The subroutine returns a NULL pointer if either the action is FIND and the item could not be found or the action is ENTER and the table is
full.
The subroutine returns zero if it cannot allocate sufficient space for the table.
See Alsobsearch(3), lsearch(3), string(3), tsearch(3)hsearch(3)