I'm looking to accomlish exactly what Anwar Shah describes here Bash script to take screenshot and save the image - Ubuntu
with the added functionality of setting a time increment for the script to continue taking screen captures. For example, I'd like to be able to execute this script and have it take and export screen shots as jpegs every 5 seconds and continue until I kill the script.
Is there any simple solution to this?