#!/usr/bin/env bash set -euo pipefail tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT cp -- "$1" "$tmp/input" process "$tmp/input" > "$2"