aboutsummaryrefslogtreecommitdiff
path: root/bin/vex.sh
blob: 8a696577c5bf7adbecc79065c8ffad6811100642 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Run a command and print a string to stdout showing pass/fail
if [ "$#" -eq 0 ] ; then
    printf >&2 'vex: Need a command\n'
    exit 2
fi
"$@"
ex=$?
case $ex in
    0) op='true'  ;;
    *) op='false' ;;
esac
printf '%s\n' "$op"
exit "$ex"