-
-
Save jeeger/39a70506bba254d88f0bd2435922ec4c to your computer and use it in GitHub Desktop.
SCP alias that warns on local copy
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
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