#!/usr/bin/env zsh # Put files on a webspace via sftp setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL autoload -U die [[ ${ARGC} -eq 0 ]] && die 1 "Usage: ${0} …" local -a putcmds for file in "${@}"; do putcmds+="put ${file}" done sftp tastytea.de <