Skip to content

Instantly share code, notes, and snippets.

@dahoo
Created May 11, 2013 21:40
Show Gist options
  • Select an option

  • Save dahoo/5561515 to your computer and use it in GitHub Desktop.

Select an option

Save dahoo/5561515 to your computer and use it in GitHub Desktop.

Revisions

  1. dahoo created this gist May 11, 2013.
    11 changes: 11 additions & 0 deletions screenshots_interval.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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