Updated: 12 February 2023
#!/bin/bash -xv
# run date command
date
# exit code is in $?
status=$?
[ $status -eq 0 ] && echo "success" || echo "failure"
Jersey & Guernsey, United Kingdom
Updated: 12 February 2023
#!/bin/bash -xv
# run date command
date
# exit code is in $?
status=$?
[ $status -eq 0 ] && echo "success" || echo "failure"