Hello everyone,
I am trying to write a script that will accomplish the following:
- query current system time and store result into a variable
- wait for some amount of time, say 300 seconds
- reset system time to earlier queried time + 1 second
I did some basic shell scripting (CSH mainly) and took an intro to perl class in 2000 but have not touched either since, and as a result I really have no idea how to accomplish this task. I'm also not really sure how to do the math on the time since the systemsetup -settime requires hh:mm:ss, so at 59 seconds I'll run into a problem
I'm currently using OS X 10.6.6 and /bin says I have access to bash, csh, ksh, tcsh, and zsh. I have no preference for which shell the script runs in, although echo $SHELL says my current default is bash, if that makes any difference.
I would also like to use argv (or something similar) to define how many cycles I'd like to process to repeat and possibly to define the wait time as well instead of hard coding these into the script.
Thanks in advance!
Xaiu