Skip to content

Instantly share code, notes, and snippets.

@dahoo
Created May 11, 2013 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dahoo/5561515 to your computer and use it in GitHub Desktop.
Save dahoo/5561515 to your computer and use it in GitHub Desktop.
Take a screenshot every x seconds
no=$1 # number of screenshots as argument
sec=1 # interval of screenshots in seconds, also floats possible
sleep 5 # optional
s = 0
for i in $(seq $no); do
sleep $sec
s = $(($i*$sec))
echo "$s seconds of $(($no*$sec))"
import -window root image_$(seq -f %0011f $i $i | cut -d ',' -f 1).png
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment