Answers for "exit status bash"

0

To set the exit status of a shell script

#!/bin/sh
if cp "$1" "$1.bak"
then
    vi "$1"
    exit   # USE STATUS FROM vi
else
    echo "bkedit quitting: can't make backup?" 1>&2
    exit 1
fi
Posted by: Guest on August-24-2021
0

exit status bash

echo $? # to print last command exit status
Posted by: Guest on October-03-2021

Code answers related to "exit status bash"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language