linuxtips:sshpartialdownload [2012/01/14 05:06] mschiff |
linuxtips:sshpartialdownload [2012/01/14 05:07] (current) mschiff Page moved from sshpartialdownload to linuxtips:sshpartialdownload |
||
---|---|---|---|
Line 57: | Line 57: | ||
fi | fi | ||
- | DST_SIZE=$($DST_CMD "if [[|-f '$DST_URL_FILE' ]]; then find '$DST_URL_FILE' -printf '%s'; else echo 0; fi") | + | DST_SIZE=$($DST_CMD "if [[sshpartialdownload|-f '$DST_URL_FILE' ]]; then find '$DST_URL_FILE' -printf '%s'; else echo 0; fi") |
PADDING=$((BLOCK_SIZE-DST_SIZE%BLOCK_SIZE)) | PADDING=$((BLOCK_SIZE-DST_SIZE%BLOCK_SIZE)) | ||
- | $SRC_CMD "if [[|$PADDING -ne $BLOCK_SIZE ]]; then dd if='$SRC_URL_FILE' ibs=1 skip=$DST_SIZE status=noxfer count=$PADDING 2>/dev/null; PADDING=$PADDING; \ | + | $SRC_CMD "if [[sshpartialdownload|$PADDING -ne $BLOCK_SIZE ]]; then dd if='$SRC_URL_FILE' ibs=1 skip=$DST_SIZE status=noxfer count=$PADDING 2>/dev/null; PADDING=$PADDING; \ |
else PADDING=0; fi; dd if='$SRC_URL_FILE' bs=$BLOCK_SIZE skip=\$((($DST_SIZE+PADDING)/$BLOCK_SIZE))" | $DST_CMD "cat >> $DST_URL_FILE" | else PADDING=0; fi; dd if='$SRC_URL_FILE' bs=$BLOCK_SIZE skip=\$((($DST_SIZE+PADDING)/$BLOCK_SIZE))" | $DST_CMD "cat >> $DST_URL_FILE" | ||
exit $? | exit $? | ||
</code> | </code> |