Lượng Tiger
New member
How do I find my exit code?
Answer
To check the exit code we can simply
print the $?special variable in bash. This variable will print the exit code of the last run command. As you can see after running the ./tmp.sh command the exit code was 0 which indicates success, even though the touch command failed.
Answer
To check the exit code we can simply
print the $?special variable in bash. This variable will print the exit code of the last run command. As you can see after running the ./tmp.sh command the exit code was 0 which indicates success, even though the touch command failed.