I have a 10 second interval. I want to run a command in a shell, then wait to complete the 10 sec interval. If the commands takes more than 10 seconds, its OK.
I am looking for an equivalent to "foo" function below :
>> foo 10 python myscript.py
- If myscript.py takes 2 seconds, the shell should wait 8 seconds afterwhile.
- If myscript.py takes 5 seconds, the shell should wait 5 seconds afterwhile.
- If myscript.py takes 12 seconds, the shell should not wait. It should not timeout myscript.py either !
Does this "foo" function exist ?