Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- host_sub_proxy () {
- declare sub_args;
- if [ -f $SCRIPT_DIR/host_sub.pl ]; then
- sub_args=$(perl $SCRIPT_DIR/host_sub.pl $@);
- [ $? != 0 ] && echo $sub_args && return 1;
- echo "$sub_args"
- fi
- sub_args=$(echo $sub_args | tail -n1);
- printf '%sOk? [y/n]%s ' \
- "$FMT_YELLOW" "$FMT_RESET"
- read -r opt
- case $opt in
- y*|Y*|"") eval "command $sub_args";;
- n*|N*) echo "----------"; return ;;
- esac
- }
- ssh() {
- host_sub_proxy ssh $@;
- }
- scp() {
- host_sub_proxy scp $@;
- }
- ssh-copy-id() {
- host_sub_proxy ssh-copy-id $@;
- }
- sshpass () {
- host_sub_proxy sshpass $@;
- }
- rsync () {
- host_sub_proxy rsync $@;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement