blob: cf174a00678dbfdf51a2ff4b3fc243b125637726 [file] [log] [blame]
djm@openbsd.orgdd369322017-04-30 23:34:55 +00001# $OpenBSD: transfer.sh,v 1.4 2017/04/30 23:34:55 djm Exp $
Damien Miller38cd4352002-05-01 13:17:33 +10002# Placed in the Public Domain.
3
4tid="transfer data"
5
djm@openbsd.orgdd369322017-04-30 23:34:55 +00006rm -f ${COPY}
7${SSH} -n -q -F $OBJ/ssh_proxy somehost cat ${DATA} > ${COPY}
8if [ $? -ne 0 ]; then
9 fail "ssh cat $DATA failed"
10fi
11cmp ${DATA} ${COPY} || fail "corrupted copy"
12
13for s in 10 100 1k 32k 64k 128k 256k; do
14 trace "dd-size ${s}"
Damien Miller38cd4352002-05-01 13:17:33 +100015 rm -f ${COPY}
djm@openbsd.orgdd369322017-04-30 23:34:55 +000016 dd if=$DATA obs=${s} 2> /dev/null | \
17 ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
Damien Miller38cd4352002-05-01 13:17:33 +100018 if [ $? -ne 0 ]; then
19 fail "ssh cat $DATA failed"
20 fi
djm@openbsd.orgdd369322017-04-30 23:34:55 +000021 cmp $DATA ${COPY} || fail "corrupted copy"
Damien Miller38cd4352002-05-01 13:17:33 +100022done
23rm -f ${COPY}