Mac os X Screencapture loop, bash script

Here’s a simple bash script that grabs screen captures at a specified interval and saves them to files:

# ./screencapture_loop delay_in_seconds file_name_prefix
while :
  screencapture -C -m $2-`printf "%03d" $x`.png
  x=$(( $x + 1 ));
  sleep $1

Tags: , , ,

One Response to “Mac os X Screencapture loop, bash script”

  1. daschacka says:

    hey, thanks for the script… but i have just noticed, that after a while… like 20 screenshots in a period of 60 seconds the screencapture command just dont make the files… also when im trying to do it manually… but then like after 10 or 15minutes it works again… any idea?

Leave a Reply