#!/bin/sh temp=$(mktemp) "$@" > "$temp" 2>&1 ret=$? if [ $ret != 0 ] then cat "$temp" 1>&2 fi rm -f "$temp" exit $ret