Home » 2021
Using the ‘sleep’ Function in Bash Scripts, with Examples
This article explains the sleep command in Bash/Shell scripts and how and why you might use it. The sleep command in Bash (and other Linux Shells) pauses execution for a specified amount of time – halting the script for a set number of seconds, minutes, hours, etc. Why Pause Execution? Why would you want to pause executing your script? Give the user a chance to interrupt an automated action Await user input Wait for a device to warm up/become available Stop text from flying across the screen if you’re trying to … Read more