Results 1 to 3 of 3
I use a simple script to time an exercise routine:
sleep 5m ; warm up 5 minutes
beep
sleep 5m ; exercise 5 minutes
beep
beep
and so on.
The ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-30-2011 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 2
simple script to run external program
I use a simple script to time an exercise routine:
sleep 5m ; warm up 5 minutes
beep
sleep 5m ; exercise 5 minutes
beep
beep
and so on.
The problem is is that I can't always hear the beep over my treadmill/airdyne, so I'd like to throw in something like 'eog green.jpg' or 'eog red.jpg' to display a full screen graphic to display for the time interval and then stop. The problem is that once the external program is started, the script stops until that program is closed. How do I run the external program, eog, in this case and have the script continue to do the timing?
- 09-30-2011 #2Just Joined!
- Join Date
- Mar 2007
- Location
- Bogotá, Colombia
- Posts
- 43
You could try launching them on background and capturing the process ID:
something like thatCode:eog image.png & lastpid=$! sleep 300 kill $lastpid eog anotherimage.png & lastpid=$!
- 09-30-2011 #3Just Joined!
- Join Date
- Apr 2010
- Posts
- 2
Thank you. That's what I needed.


Reply With Quote
