catching keybord input
IS there a way to continue a script after "the any key" is pressed by a user? :)
I know there's the command "read" but then the input is put into a variable. Now i wan't to continue the script without comparing the user input. I tried something like this: echo "Press any key to continue" read input if [ $input = true ]; then echo "Ok here we go" fi Also with a wild card but it doesn't work properly. Is there perhaps another way then with the "read" function? |
So you want to continue unconditionally if a key is pressed?
Try this: Code:
echo "Press enter to continue" |
Hi indur,
Please change your if statement to Code:
if [ $input ] |
|
@ vinaytp
That simple! :) Nice tnx! @ MTK358 That was not wat i had in mind but tnx anyway. |
Please do not use texting shorthand here.
what thanks |
All times are GMT -5. The time now is 04:12 PM. |