Skip to content

Instantly share code, notes, and snippets.

@jeeger
Created July 13, 2018 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeeger/39a70506bba254d88f0bd2435922ec4c to your computer and use it in GitHub Desktop.
Save jeeger/39a70506bba254d88f0bd2435922ec4c to your computer and use it in GitHub Desktop.
SCP alias that warns on local copy
scp() {
totalcolons=$(echo "$*" | tr -cd ':' | wc -c)
if [[ totalcolons -lt 1 ]]; then
echo "Less than 1 colon in scp command."
else
/usr/bin/scp $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment