Skip to content

Instantly share code, notes, and snippets.

@johnSerrano
Created October 2, 2016 04:49
Show Gist options
  • Save johnSerrano/ad755c1db842ef1fc189b19e4ad8fa06 to your computer and use it in GitHub Desktop.
Save johnSerrano/ad755c1db842ef1fc189b19e4ad8fa06 to your computer and use it in GitHub Desktop.
script to move files into dropbox with size checking
#!/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