using enter key in shell script


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users using enter key in shell script
# 1  
Old 06-06-2007
using enter key in shell script

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
# 2  
Old 06-06-2007
You can read any user input using the 'read' command. If you want to do anything else, you need to explain your requirements a little better.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simulate enter key

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

2. Shell Programming and Scripting

Script termination without pressing Enter key[nohup]

I have a script in which we have used nohup. Once script is executed it will be terminated only when enter key is pressed. I want the script to be terminated without pressing enter key nohup imqbrokerd -name user_id port 2>1 1>$home_`date` & I am a newbie to shell, Kindly please help (3 Replies)
Discussion started by: Suganbabu
3 Replies

3. Shell Programming and Scripting

How to pass enter key or selected character in bash script?

hi, i've bash script thats working... but now i need to add a line....that prompts for user input....like yes and 1 as complete install.... so here's how it looks... $ cd 9200 (cd into directory) $./install (hv to type ./install to run install then ask for) ----do you want to... (4 Replies)
Discussion started by: kernel11
4 Replies

4. Shell Programming and Scripting

How to enter a return key in bash script?

Hi, I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP) I have this script working in both AIX and HP-UX. The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
Discussion started by: duker61
14 Replies

5. Shell Programming and Scripting

Simulating enter key via shell script

How to simulate enter key via shell script (2 Replies)
Discussion started by: proactiveaditya
2 Replies

6. Shell Programming and Scripting

enter key solaris

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)
Discussion started by: sajjunaqvi
1 Replies

7. Shell Programming and Scripting

How to catch ENTER key inside the shell script?

Hi, I have a script in which i have to ask user to press the ENTER key to proceed further. can you please help me how can i achive this in my scripting? echo "All the executables builded Successfully " echo " Press Enter to Go Back to the Main Menu" ... (2 Replies)
Discussion started by: plaban.rout
2 Replies

8. Shell Programming and Scripting

writing Enter key inside in shell script

for automating telnet using shell script..... as we enter alphabetic characters inside shell script...how can we do the same for the enter key......Is there any character for the enter key so the enter key need not be pressed manually...... (3 Replies)
Discussion started by: bishweshwar
3 Replies

9. UNIX for Dummies Questions & Answers

Pressing backspace key simulates enter key

Hi, Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused: Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

10. Shell Programming and Scripting

read the ENTER key

Hi , I do the following : ]echo "Do you want to say yes or no ?(y/n):\c" read ans here 'n' is the default value.that means if the user press ENTER key then it should be 'n' . Now how do i know that the user has pressed ENTER key.What will be stored in my variable 'ans'. (4 Replies)
Discussion started by: sars
4 Replies
Login or Register to Ask a Question