VideosMy ProjectsProgramming BlogGallery
  1. Home
  2. Blog
  3. How to pause a script in Bash
Programming Blog

Atom/RSS Feed

bash

How to pause a script in Bash

bash

In order to make a script in Bash pause, sleep or wait for a period of time you need to use the command sleep

Using sleep in Bash

echo "hello"

sleep 60 ## this will sleep for 60 seconds

echo "after 60 sec"

Extra features

You can additionally specify the unit of time.

letter unit
s default seconds
m minutes
h hours
d days
Join my mailing list