blob: 8248d1af97eacf5aa930f2767abd4c8c341a051d [file] [log] [blame]
#!/bin/sh
#
# Run a command when another command exits. Example:
#
# deathrattle "ls /tmp" sleep 5
#
# This will sleep for 5 seconds and then list the contents of /tmp.
rattle="$1"
shift
$@
result=$?
( $rattle )
exit $result