You need to use the sleep command to add delay for a specified amount of time. The syntax is as follows:
Where SUFFIX may be:
sleep NUMBER[SUFFIX]
- s for seconds (the default)
- m for minutes.
- h for hours.
- d for days.
sleep 5
To sleep for 2 mintus, use:
sleep 2m
sleep Command Bash Script Example
#!/bin/bash
echo "Hi, I'm sleeping for 5 seconds..."
sleep 5
echo "all Done."
No comments:
Post a Comment