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