seekablepipe turns the reading end of a pipe into a seekable
file descriptor, using a temporary file.
Interface
writer | seekablepipe tmpfile reader [ args ... ]
seekablepipe writes writer's output to tmpfile,
which is unlinked as soon as it is created. Then it execs into
reader, reading from a file descriptor on tmpfile.