Tuesday, November 5, 2013

Cool Script for Taking Screenshots in OSX Where You can Specify the Path and Name of File!

#!/bin/bash
usage() {
  echo "$0 <path>"
}
if [[ $1 != "" ]]; then
  screencapture -i $1
else
  usage
fi


Save this as screenshot_osx.sh and make it executable:

chmod 755 screenshot_osx.sh

To run it from Terminal simply do:

./screenshot_osx.sh /path/to/your/screenshot.png

A cross will be displayed to select what you want to capture...click, drag, snapshot, and enjoy!

Cheers