Created
April 7, 2015 14:59
-
-
Save fimdomeio/e818d1819fa6ba1efd34 to your computer and use it in GitHub Desktop.
Upload Latest Mac Screenshot
This file contains hidden or 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 | |
cd /Users/YOURUSER/Desktop | |
#get latest screenshot (change Captura de ecr to whatever your mac prefixes your screenshot filenames) | |
file=$(ls | grep "Captura de ecr" | tail -n1) | |
now=$(date +%s) | |
#copy to your server on a web accessible address | |
scp "$file" YOURSERVER:/SOME/WEB/ACCESSIBLE/ADDRESS/$now.png | |
#output link for sharing | |
echo "url: http://YOURSERVER/THE/PATH/$now.png" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment