Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bash: How to make short delay?

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.

like image 693
Raihan Avatar asked Oct 13 '11 16:10

Raihan


1 Answers

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.

like image 65
Chriszuma Avatar answered Oct 02 '22 20:10

Chriszuma