11
rated 0 times
[
11]
[
0]
/ answers: 1 / hits: 29568
/ 3 Years ago, mon, june 21, 2021, 9:25:00
I need a pause on a shell script to show a warning before continuing.
For instance, on DOS it goes like this:
doit.bat:
[...]
echo 'Are you sure? Press Ctrl-C to abort, enter to continue.'
pause
[...]
How can I do this on bash?
For the moment a sleep command seems to do the trick and is simple enough but is not exactly the idea:
doit.sh
[...]
echo 'Are you sure? Press Ctrl-C to abort.'
sleep 3
[...]
More From » bash