#!/usr/bin/env bash if [ "$#" -ne 2 ]; then echo Send an entire directory over the network. echo Shows progress via pv - note that progress is measured before compress is added. echo Usage: echo " senddir directoryname listen_port_number" exit fi tar cf - $1 | pv | gzip | nc -l $2