diff --git a/test_fail.sh b/test_fail.sh index 754f3c7..512d69f 100755 --- a/test_fail.sh +++ b/test_fail.sh @@ -1,9 +1,6 @@ #!/bin/sh +# show what is to be run echo $1 -eval $1 - -if [ $? -eq 0 ]; then - exit 0; -fi -exit 1; +# run the command +eval $1 || exit 1 # if fails, return 1