![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| handling Infinite fork | ashish_uiit | UNIX for Advanced & Expert Users | 3 | 05-21-2008 02:22 AM |
| the given code goes in infinite loop and does not increment variable i | mrityunjay22 | Shell Programming and Scripting | 6 | 12-26-2007 02:20 AM |
| pick the bug the server enters an infinite loop | arjunjag | High Level Programming | 3 | 07-19-2007 01:53 AM |
| ls command in infinite Loop | umakant | SUN Solaris | 3 | 07-17-2007 01:25 AM |
| high priority thread contains an infinite loop | rvan | High Level Programming | 0 | 02-14-2007 09:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Which is more efficient - sleep or infinite while?
Hi
i need to make a script to check disk space every hour. ****Note that cron is not allowed. So i need to use either sleep or while 1 ...pls suggest which is more efficient in this scenario? And is there any other way to do the task? Thanks, Ashish |
|
||||
|
Quote:
if i use sleep with goto ..will that be moe effiecient as comapred to while 1? Also what are drawbacks of sleep and while 1. |
|
||||
|
I would say that's pretty much the same thing (while and goto) but for the sake of simplicity I would advise you go use while.
There are no drawbacks in sleep and while 1. It does it's job and then simply does nothing for 3600 seconds. |
|
|||||
|
Quote:
as i undestand it, the ":" is more closer to null code... yes, both are built in, but im sure [ has tons of lines to work as the external test (and all the testing capabilitie it has) : "looks & feels slimer" |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|