Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sleep for less than 1 second in unix shell script 1

Status
Not open for further replies.

GrahamBright

Programmer
Oct 31, 2003
65
0
0
AT
Hi,

I'm looking for a way to sleep for less than 1 second in unix.

if [ -f $MSISDN_FILE ] ; then
while read LINE
do
echo $LINE
#call script
#sleep $1 << not sufficent 1 second is too long
done < $MSISDN_FILE

I can't find any examples of how to use usleep() for this task as this I belive would be perfect.

Example:
I would like to execute a perl script with every half a second but this isn't possible using standard sleep?

Graham.

 
FANTASTIC !

Thanks PHV.

Tek-tips saves another day.

Graham.
 
Some sleep(1) commands as the GNU one support this. Maybe better get one of those.. having perl involked all the time may surprise you with excessive CPU usage.

. Mac for productivity
.. Linux for developement
... Windows for solitaire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top