Bash tests
This page was last updated on April 4, 2012.
| File Tests | |
|---|---|
| nt | Newer than |
| d | is a directory |
| f | is a file |
| r | readable |
| w | writeable |
| x | executable |
| Logical Tests | |
| && | logical AND |
| || | logical OR |
| ! | logical NOT |
| Numeric Tests | |
| lt | less than |
| gt | greater than |
| eq | equal to |
| ne | not equal |
| ge | greater or equal |
| le | less or equal |
| String Tests | |
| = | equal to |
| z | zero length |
| n | not zero length |
- See the CaseTest page.
Obligatory Happy Ending
And they all lived happily ever after. The end.
