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 :: npm install @reach/router 
Shell :: install docker raspberry 
Shell :: yarn download ubuntu 
Shell :: codineer digital 
Shell :: install nodemon dev 
Shell :: install jupyterlab with conda 
Shell :: install typescript globally 
Shell :: inkscape ubuntu ppa 
Shell :: install webpack version 
Shell :: Unable to resolve dependency tree error when installing npm packages 
Shell :: git change https to ssh 
Shell :: unzip tar.bz2 
Shell :: adb server kill and start 
Shell :: upgrade pytorch version 
Shell :: how to change the icon of a python exe file 
Shell :: arch linux emoji not showing 
Shell :: colab unzip tar.gz 
Shell :: zsh: corrupt history file /home/pi/.zsh_history 
Shell :: install intel graphics driver ubuntu 
Shell :: force git to use ssh 
Shell :: install k3s 
Shell :: install lightshot on ubuntu 
Shell :: kill process running on port in windows 
Shell :: serverless log fucntion 
Shell :: install helm ubuntu 
Shell :: get remote IP of wsl ubuntu 
Shell :: git how to find original branch creator 
Shell :: install cv2 ubuntu 
Shell :: install latest nodejs stable linux 
Shell :: vue-cli-service not found 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =