eolas/Programming_Languages/Shell/Test.md

15 lines
458 B
Markdown
Raw Normal View History

2023-02-03 14:51:52 +00:00
---
categories:
- Programming Languages
tags:
- 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`
2023-02-08 13:17:19 +00:00
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