#!/bin/sh set -e tmp=/var/tmp/seekable.$$ exec 3<&0 4<&1 >$tmp <$tmp rm $tmp cat <&3 exec ${1+"$@"} 1<&4 3>&- 4>&-