#!sh # Look for cygpath (a pretty good indicator that we're in cygwin) # and, if found, use it to protect evil drive letters if command -v cygpath >/dev/null 2>&1; then filefrom=$(cygpath "$1") fileto=$(cygpath "$2") scp -C -p "$filefrom" "$fileto" else # here, we're probably unix scp -C -p $1 $2 fi