Updated: 12 February 2023
#!/bin/bash -xv
# run date command
date
# exit code is in $?
status=$?
[ $status -eq 0 ] && echo "success" || echo "failure"
Freelance software engineer 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"