Shell
You're viewing a free preview. Sign in free to read every script.
Why this exists In a shell, "true" and "false" are not values, they are exit codes . A command that succeeds returns 0; anything else means failure. if simply runs a command and looks at that code. Once this is clear,…
Shell Basics: Conditions, Tests and Exit Codes
How the shell decides: every command returns an exit code, if tests that code, and [[ ]] provides file, string and number tests. Covers case statements, && and ||, and checking that required tools exist.
Sign in free to read this script, along with the rest of the library.
Sign in free