Skip to content

Instantly share code, notes, and snippets.

@yyq123
Created August 13, 2011 12:06
Show Gist options
  • Save yyq123/1143778 to your computer and use it in GitHub Desktop.
Save yyq123/1143778 to your computer and use it in GitHub Desktop.
do shell script
"DATE=`date '+%Y%d%m-%H%M%S'`;
FILE=~/Pictures/screenshot-${DATE}.png;
screencapture -i -W -x $FILE;
if [ -e $FILE ];
then open /Applications/Preview.app $FILE;
fi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment