Brendon Costa wrote: Seems pretty reasonable to me, but I'd suggest a little tweak:
#! /bin/sh # DESCRIPTION=$1 COMMAND=$2 shift shift echo $DESCRIPTION
< $COMMAND $* > /dev/null
---
> output=`$COMMAND ${1+"$@"}`
RESULT=$? if test $RESULT -ne 0; then
> exec 1>&2
echo "Command failure:" echo "\t$COMMAND $*"
> echo "$output"
fi exit $RESULT
