Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    simple script to run external program

    I use a simple script to time an exercise routine:

    sleep 5m ; warm up 5 minutes
    sleep 5m ; exercise 5 minutes

    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?

  2. #2
    Just Joined!
    Join Date
    Mar 2007
    Bogotá, Colombia
    You could try launching them on background and capturing the process ID:

    eog image.png &
    sleep 300
    kill $lastpid
    eog anotherimage.png &
    something like that

  3. #3
    Thank you. That's what I needed.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts