eolas/Programming_Languages/Shell/Test.md
2023-02-08 13:17:19 +00:00

458 B

categories tags
Programming Languages
shell

Test in bash

test is a built-in command that is used to compare values or determine whether something is the case.

When we run a test the result we get back is a return status of a 0 or a 1

We can use the command test but it is more common to test a condition implicity by using square brackets. The square brackets are an alias for test. We use this alias when we use IF logic