Last active
January 15, 2021 02:52
-
-
Save yumu19/7a10b30c0abd22cc28ec to your computer and use it in GitHub Desktop.
Automatically Capture of Screenshots for Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INTERVAL=60 #Interval of Capture Screen(seconds) | |
DIRNAME="${HOME}/Desktop/capture/" | |
if [ ! -e ${DIRNAME} ]; then | |
mkdir ${DIRNAME} | |
fi | |
while true | |
do | |
DATE=`date +%Y%m%d_%H%M%S` | |
FILENAME0="${DIRNAME}${DATE}_00.png" | |
FILENAME1="${DIRNAME}${DATE}_01.png" | |
FILENAME2="${DIRNAME}${DATE}_02.png" | |
screencapture ${FILENAME0} ${FILENAME1} ${FILENAME2} | |
echo "capture at ${DATE}" | |
sleep $INTERVAL | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment