3 ms·
ps: FWIW, I made a script and the line with "progress" works on a single line now, not sure what I was doing wrong before. My contact info is in the footer of
by lcall 6y ago
ps: FWIW, I made a script and the line with "progress" works on a single line now, not sure what I was doing wrong before. My contact info is in the footer of the web site noted in my profile, if it sounds useful. But the main line is something like this:
echo -e "progress\n put $1"|sftp -CfpN -b - "$2"
Or, to be able to echo it first for confirmation (bash, typed/untested largely from memory not the actual script but close):
#!/usr/bin/env bash
set -eu; set -o pipefail
if [[ #$ -ne 2 ]]; then echo "2 parameters expected"; exit 1; fi
CMD="echo -e \"progress\n put $1\"|sftp -CfpN -b - \"$2\""
echo "Do this (Enter to continue)?: $CMD";read
bash -c "$CMD"; echo "Result: $?"