Running a command after a delay of n secs
Hi
Is there a command which will run a command I specify (this latter command will be the argument in the former one) after n seconds ? Something like runlater "ls -l", 10 Thanks |
'sleep n && ls -l' should do the trick. 'man sleep' for a full list of options.
regards, ...drkstr |
What's wrong with the sleep command?
Example: Code:
sleep 10 && ls -l |
Oh...didnt know we could have && in shell - thanks.
So if I wanted a php script to execute after 10 secs, sleep 10 && php path/scrtip.php will work ? |
Or you can use "at"
|
Yup, you are just telling it to run the next command after the first one finishes. You can do as many as you want. I use it when I compile my kernel so I can just type one command and walk away until it finishes.
regards, ...drkstr |
All times are GMT -5. The time now is 12:13 AM. |