2018-03-16 23:48:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# execute command
|
2018-08-22 03:16:41 +00:00
|
|
|
"$@"
|
2018-03-16 23:48:36 +00:00
|
|
|
|
|
|
|
# check status
|
|
|
|
STATUS=$?
|
|
|
|
if [ $STATUS == 0 ]; then
|
2018-08-22 03:16:41 +00:00
|
|
|
echo "Command " "$@" " completed successfully"
|
2018-03-16 23:48:36 +00:00
|
|
|
else
|
2018-08-22 03:16:41 +00:00
|
|
|
echo "Command " "$@" " exited with error status $STATUS"
|
2018-03-16 23:48:36 +00:00
|
|
|
fi
|