-
-
Save johnSerrano/ad755c1db842ef1fc189b19e4ad8fa06 to your computer and use it in GitHub Desktop.
script to move files into dropbox with size checking
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 | |
#Script for moving files into Dropbox. Makes sure there's no nasty surprises. | |
set -euo pipefail | |
echo "Calculating size..." | |
du -hcs $* | |
echo "Drop this much data?" | |
select yn in "Yes" "No"; do | |
case $yn in | |
Yes ) cp $* ~/Dropbox; break;; | |
No ) exit;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment