X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/36c88e594034eb6c25b711d0926d213434817ee5..89e9c6b74e84efeeb74e543c829eb93fa61df993:/slurp-pics diff --git a/slurp-pics b/slurp-pics new file mode 100755 index 0000000..7c90ed8 --- /dev/null +++ b/slurp-pics @@ -0,0 +1,17 @@ +#!/bin/bash + +while read host path;do + { + echo "cd $path" + sftp -v -P 19362 -i .slurp-key "slurp@$host" <<< "cd $path"$'\n'"ls -1" | + sed 1,2d | + while read filename;do + if [[ -e "$filename" ]];then + echo "skipping $filename" >&2 + else + echo "getting $filename" >&2 + echo "get -p $filename ${filename/jpg/jpeg}" + fi + done + } | sftp -v -P 19362 -i .slurp-key "slurp@$host" +done < .slurp-hosts