From 388b275bd08a9068a450b6bb1f2ee028fce58827 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sun, 19 May 2024 13:36:17 -0600 Subject: [PATCH] Scripts: add scp_turbo script --- bin/scp_turbo | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 bin/scp_turbo diff --git a/bin/scp_turbo b/bin/scp_turbo new file mode 100755 index 0000000..3218315 --- /dev/null +++ b/bin/scp_turbo @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +print_help() { + cat < '$to'" +elif [[ $# -eq 3 ]]; then + declare -r remote="$1" + declare -r from="$2" + declare -r to="$3" + + cat "$from" \ + | pv -s $(stat -c %s "$from") \ + | ssh -o ClearAllForwardings=yes "$remote" "cat > '$to'" +else + print_help + exit 2 +fi