|
|
10.5: List service ACLs on Mac OS X 10.5 Server
The stock sleep command does not work with intervals smaller than 1 second.
If you try you will see it doesn't matter if you use sleep 0.5 or 0.9 or 0.01.
A quick and dirty solution in phyton: -------- snip ---------------------------- #!/usr/bin/python #fsleep: accept fraction of seconds import time import sys try: time.sleep(float(sys.argv[1])) except: print 'Error in parameter.' sys.exit(1)-------- snip ---------------------------- Save the above script as fsleep and make it executable (chmod +x fsleep) this one will work also with fractional seconds (e.g.: fsleep 0.1)
10.5: List service ACLs on Mac OS X 10.5 Server
...or, if you prefer a binary executable, save the following code as "msleep.c":
---- snip -----------------
---- snip -----------------and compile it with the command gcc msleep.c -o msleep, it will create the msleep binary. The sintax of msleep is: msleep <milliseconds> (e.g.: msleep 500 for a delay of 0.5 seconds)
10.5: List service ACLs on Mac OS X 10.5 Server
I'm afraid you are wrong :)
10.5: List service ACLs on Mac OS X 10.5 Server
Interesting. Stats on my Mac (10.5.7) gave this:
10.5: List service ACLs on Mac OS X 10.5 Server
mmmhmm... It seems I found the answer.
10.5: List service ACLs on Mac OS X 10.5 Server
Hi,
10.5: List service ACLs on Mac OS X 10.5 Server
Yes, it works. That's a workaround, but fixes the problem and makes the script more "international".
10.5: List service ACLs on Mac OS X 10.5 Server
well, the 0.05 delay might be too small, you are right. I've made 99% of my tests over an ssh connection, so may be the latency slowed my beachball :)
10.5: List service ACLs on Mac OS X 10.5 Server
It's fun noting that the python script I wrote above ignores locales (wants "." as decimal point or it will give an error) while sleep doesnt... no consistent locale behaviour in CLI. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.15 seconds |
|