Wait for a particular duration before automatic option selection
up vote
1
down vote
favorite
echo "Select option: Enter 1 or 2. (1. cakes 2. coffee)"
set selection=$<
...
I want to wait for 40 seconds for user input. If there is no user input within this delay time, I want to automatically set selection as 1. How can I achieve this in tcsh?
Also welcome solutions in bash or csh.
shell tcsh
add a comment |
up vote
1
down vote
favorite
echo "Select option: Enter 1 or 2. (1. cakes 2. coffee)"
set selection=$<
...
I want to wait for 40 seconds for user input. If there is no user input within this delay time, I want to automatically set selection as 1. How can I achieve this in tcsh?
Also welcome solutions in bash or csh.
shell tcsh
1
at a bash prompt, enterhelp read
and look at the-t
option
– glenn jackman
Nov 22 at 15:40
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
echo "Select option: Enter 1 or 2. (1. cakes 2. coffee)"
set selection=$<
...
I want to wait for 40 seconds for user input. If there is no user input within this delay time, I want to automatically set selection as 1. How can I achieve this in tcsh?
Also welcome solutions in bash or csh.
shell tcsh
echo "Select option: Enter 1 or 2. (1. cakes 2. coffee)"
set selection=$<
...
I want to wait for 40 seconds for user input. If there is no user input within this delay time, I want to automatically set selection as 1. How can I achieve this in tcsh?
Also welcome solutions in bash or csh.
shell tcsh
shell tcsh
edited Nov 22 at 15:37
Romeo Ninov
4,98431627
4,98431627
asked Nov 22 at 15:32
mandrake00
294
294
1
at a bash prompt, enterhelp read
and look at the-t
option
– glenn jackman
Nov 22 at 15:40
add a comment |
1
at a bash prompt, enterhelp read
and look at the-t
option
– glenn jackman
Nov 22 at 15:40
1
1
at a bash prompt, enter
help read
and look at the -t
option– glenn jackman
Nov 22 at 15:40
at a bash prompt, enter
help read
and look at the -t
option– glenn jackman
Nov 22 at 15:40
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483473%2fwait-for-a-particular-duration-before-automatic-option-selection%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
at a bash prompt, enter
help read
and look at the-t
option– glenn jackman
Nov 22 at 15:40