Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Bash add pause prompt in a shell script with bash pause command

read -p "Press [Enter] key to start backup..."
read -p "Press any key to resume ..."
## Bash add pause prompt for 5 seconds ##
read -t 5 -p "I am going to wait for 5 seconds only ..."
Comment

pause in bash

#pause 5 second, first method
read -t 5

#pause 5 second, second method
sleep 5s
Comment

pause bash script

function pause(){
 read -s -n 1 -p "Press any key to continue . . ."
 echo ""
}
 
## Pause it ##
pause
 
## rest of script below
Comment

PREVIOUS NEXT
Code Example
Shell :: tar compress powershell 
Shell :: powershell writeline 
Shell :: git submodule remove 
Shell :: install pandas 
Shell :: sudo tee trick 
Shell :: taskbar directory windows 
Shell :: bash kill all terminal 
Shell :: minikube start with docker driver 
Shell :: linux link file 
Shell :: Undo the commit and completely remove all changes 
Shell :: git no ssl verify 
Shell :: get disk partitions linux 
Shell :: set permanant environemt variable 
Shell :: spyder 4.2.5 requires pyqt5<5.13, but you have pyqt5 5.15.4 which is incompatible. 
Shell :: depmod: not found 
Shell :: psycopg2-binary install for M1 
Shell :: leap year bash shell 
Shell :: install vlc rhel 
Shell :: git push specify ssh key 
Shell :: register runner gitlab 
Shell :: command to check pip3 version on linux 
Shell :: webpack install 
Shell :: linux how to open .x86_64 
Shell :: vendor/autoload.php download 
Shell :: change password raspberry pi 
Shell :: enospc no space left on device 
Shell :: find in file linux 
Shell :: last login linux 
Shell :: run jar file on the background on ubuntu 
Shell :: install activitywatch ubunut 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =