An Algorithm of How to Use Shell Script Sleep Command
Here you will find out:
- about the shell script Sleep command
- how to use it
- when DiskInternals can help you
Are you ready? Let's read!
About the shell script Sleep command
If you are a Linux user, you have learned about so many commands, of which Bash script commands are especially familiar. This guide will show you how to use the Sleep command on Linux, as well as introduce you to a freeware program that lets you access Ext4 partitions on Windows when you're dual-booting on a PC.
What is that shell script Sleep command?
Simply, the Sleep command is used in Bash shell scripts to delay the runtime of a script for a specified period before it starts running again. You can make a Bash script sleep for seconds, minutes, hours, or even days using the suffixes S, M, H, or D, respectively.
Examples of Sleep commands
To add Sleep to a Bash script, you need to know the suffixes and make sure you use them appropriately. It is possible to make a Bash script sleep for five days or more; all you need do is to write the command [sleep], then the number [10] of days, followed by the suffix for days, which is "D."
Thus, if you want a Bash script to sleep for 10 days, here's an example:
sleep NUMBER [SUFFIX] ...
Want to make your shell script sleep for 10 days? Type:
Sleep 10D
For 5 minutes, use:
5m
For some seconds, use:
Sleep 10s
The above are examples of how to add Sleep to your Bash shell script. It's quite simple: write the command, the number, and the respective suffix.
Linux shell Sleep example
If you're looking for a Linux shell sleep example, below is the most basic one to use in your Bash scripts.
The example above will print something like the following:
15:20:15
15:20:25
Thus, the script paused for 10 seconds before continuing.
You can also use the read command to pause bash shell script for few second before continuing:
The example will output this:
waiting to process your file in seven second... .
file processed, generating the document file now ... .
Want to access Linux files on Windows?
If you have some important files saved on your Linux partition and you booted to Windows, there's no possible way to achieve that. However, with DiskInternals Linux Reader, you can view and access all Ext4 partitions when you're on Windows.




DiskInternals Linux Reader is a freeware program designed to help users on a virtual machine or dual-boot computer to access their Linux files while on Windows. It is an intuitive software solution that requires no special expertise to work.
Related articles
- How to Access Linux Ext2 or Ext3 on Windows
- Mount Linux Drive on Windows for Free
- Guide in Pictures
- A Bash Dirname Command
- Learn about Korn shell scripting
- Bash: how to split strings in Linux
- Here is everything you need to know about Bash for Windows
- Linux: Sudo in Bash Scripts
- Use a Shell Script to Send an Email
- Learn about useful bash scripts
- Learn about systemd startup script
- Using /usr/bin/env command
- The disk you inserted was not readable by this computer error
- Shell script usage
- About a bash date command
- How to Access Ext4 from Windows
- How to Mount Ext4 on Windows for Free
- Bash Script: All You Need to Know
- An Algorithm: How to Create Bash While Loop
- Linux Shell: What You Need to Know at First
- 5 Basic Shell Script Examples for Your First Script
- Bash: How to Check if the File Does Not Exist
- Bash Time Command on Linux
- How to use bash get script directory in Linux
- How to Check Bash String Equality
- Bash: How to Loop Through Files in Directory
- 20 Examples of Bash Find Command
- Bash Cat Command in Examples
- Bash Script SSH: How to Use It
- Bash: A Script For User Input
- Linux ZSH: the basic you need to know
- Basic of Grep in Linux Shell Script
- Shell Script Cut: Basic You Need to Know
- Bash: How to Check if String Not Empty in Linux
- Hello World Script in Bash
- A Linux bin/bash Shell
- Linux: New Line in Shell Script
- Linux: Bash String Ends With
- Linux: Bash Printf Examples
- Linux: Bash First Line
- Linux: $0 in a Shell Script
- Linux: A Bash Startup Script
- Linux: Write a Shell Script
- Shell Script: Replace String in File
- A crontab service shell script
- A Bash Multiline Command
- Bash and sh: is there any difference
- Linux: A Bash Source Command
- A Bash to Loop through Lines in File
- Linux: A Bash Linter
- A Bash Nested Loop
- A Bash Test Command
- A Bash Status of Last Command
- Linux: A Bash Basename Command
- Using Bash to Write to a File
- About Bash Language
- Bash for Loop in One Line
- About chaining bash commands
- Learn about a bash error code
- Using a bash tee command
- About a bash export command
- Learn about a bash wait command
- Arch Linux install script
- About advanced bash scripting
- To run a shell script in Dockerfile
- About a bash UNTIL loop
- Learn about C shell script
- Whether bash waits for command to finish
- Using bash if 0
- Using && in an IF statement in bash
- If you want to run shell script in background
- Learn about SFTP in bash scripting
- Learn to run Perl script in Linux
- Examples of using the Expect
- Copy command in shell scripts
- Install Oracle Database
- AWK in a Bash Script
- How to Use Linux Wait Command
