The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
BASH: Any Way to Get User Input Without Requiring Them to Hit the Enter Key? deckard Shell Programming and Scripting 2 03-06-2009 10:35 AM
exit script if user input not four characters ajp7701 Shell Programming and Scripting 2 10-30-2008 05:48 PM
capturing enter and exit of every function jjinno High Level Programming 5 09-10-2008 09:25 AM
Can i enter password with out user interaction kumar_d Shell Programming and Scripting 1 06-21-2005 02:21 AM
hit 'enter' with no user intervention jpprial UNIX for Dummies Questions & Answers 1 09-28-2001 12:05 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-17-2009
frozensmilz's Avatar
frozensmilz frozensmilz is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 28
Exit script if the user dosent enter any data within 5 seconds

Hello friends,

Kindly help me in developing a script that asks user to enter a value and will wait for 5 seconds for the feedback. If there is no answer from the user the script will perform exit or it will continue doing something else

Ex: If yu have a multi OS system i believe while starting it will ask which one to boot and will wait for 30 seconds. The data about how much time remaining will also be dynamically displayed somewhere near to it.

Expected Output 1:
Do you want to continue (y/n) ?
Remaining seconds: 5

if the above is not possible, this one will count in background

Expected Output 2:
Do you want to continue (y/n) ?

the Remaining seconds will be updated dynamically. if this is not possible atleast the script should count in background.

Thanks.
  #2 (permalink)  
Old 03-18-2009
rikxik's Avatar
rikxik rikxik is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 250
You should first check in the forums before asking questions - it has been answered before here
  #3 (permalink)  
Old 03-18-2009
frozensmilz's Avatar
frozensmilz frozensmilz is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 28
"Giving "read" from standard input a timeout." - the title dosent make any sense.
Can you please tell me what keyword or string have you used to get this result ?. May be i should improve my search skills. thanks.
  #4 (permalink)  
Old 03-18-2009
rikxik's Avatar
rikxik rikxik is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 250
That's alright. This is the search I did.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0