Checking exit codes in bash
Monday, 5 September 2022
Add Comment
There are quite a few exit codes used on Linux systems, though no listing you can display when you’re feeling curious. In fact, you won’t see the numeric codes unless you specifically ask for them.
Instead, you will see a textual description of the problem you encountered—such as “No such file or directory”—in a context like this:
$ bin/runme bash: bin/runme: No such file or directory
If you want to see the numeric exit code, you can use the echo $? command. The error message will tell you that there is no “runme” script in your bin directory. The echo $? command will respond with only a number.
from Network World https://ift.tt/9GTzcXw
Genrerating Link.... 15 seconds.
Your Link is Ready.
0 Response to "Checking exit codes in bash"
Post a Comment