# $OpenBSD: sftp.sh,v 1.4 2013/05/17 04:29:14 dtucker Exp $ # Placed in the Public Domain. tid="basic sftp put/get" SFTPCMDFILE=${OBJ}/batch cat >$SFTPCMDFILE < /dev/null 2>&1 r=$? if [ $r -ne 0 ]; then fail "sftp failed with $r" else cmp $DATA ${COPY}.1 || fail "corrupted copy after get" cmp $DATA ${COPY}.2 || fail "corrupted copy after put" fi done done rm -f ${COPY}.1 ${COPY}.2 rm -f $SFTPCMDFILE