This tutorial explains Linux “sleep” command, options and its usage with examples.
sleep – delay for a specified amount of time.
`sleep’ pauses for an amount of time specified by the sum of the values of the command line arguments.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
SUFFIX may be `s’ for seconds (the default), `m’ for minutes, `h’ for hours or `d’ for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number.
To incorporate pause for 5 seconds or 2 minutes in my bash shell script
Check this: Information Technology Books | Programming MCQs
To sleep for 5 seconds, use:
To sleep for 2 mintus, use:
sleep Command Bash Script Example
#!/bin/bash echo "Hi, I'm sleeping for 5 seconds..." sleep 5 echo "I'm awake Now."
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
If you wish to look at all Linux commands and their usage examples, go to Linux Commands Tutorial.
- Practice Programming MCQs
- Buy Linux Books
- Apply for Programming Internship
- Apply for Linux Internship
- Buy Information Technology Books