Bash: How to make short delay?

Raihan picture Raihan · Oct 13, 2011 · Viewed 10.1k times · Source

How to make a short delay (for less than a second) in bash? The smallest time unit in sleep command is 1 sec. I am using bash 3.0 in SunOS 5.10.

Answer

Chriszuma picture Chriszuma · Oct 13, 2011

I don't know what version this was implemented in, but my version of sleep (v6.12) accepts decimals. sleep 0.5 works.

If yours is too old for that, a short python or C program would probably be your only solution.