I would like to pass the output of a tar command and multiple commands which handle the tar stream over ssh ... something like this
tar -zcf - foo | ssh $host << EOF
tar -xf -
do-something-with-foo
do-other-things
EOF
doesn't work but is this somehow possible?