Horje
pause in bash Code Example
sh wait 10 seconds
sleep .5 # Waits 0.5 second.
sleep 5  # Waits 5 seconds.
sleep 5s # Waits 5 seconds.
sleep 5m # Waits 5 minutes.
sleep 5h # Waits 5 hours.
sleep 5d # Waits 5 days.
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 ..."
bash wait 3 seconda
sleep .5 # Waits 0.5 second.
sleep 5  # Waits 5 seconds.
sleep 5s # Waits 5 seconds.
sleep 5m # Waits 5 minutes.
sleep 5h # Waits 5 hours.
sleep 5d # Waits 5 days.
pause bash script
function pause(){
 read -s -n 1 -p "Press any key to continue . . ."
 echo ""
}
 
## Pause it ##
pause
 
## rest of script below
pause in bash
#pause 5 second, first method
read -t 5

#pause 5 second, second method
sleep 5s




Shell

Related
ssh command to put file from local to remote Code Example ssh command to put file from local to remote Code Example
how to copy a file to a remote server using the command line Code Example how to copy a file to a remote server using the command line Code Example
how to install homebrew Code Example how to install homebrew Code Example
scp Code Example scp Code Example
brew install ubuntu Code Example brew install ubuntu Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12