UESH conditions
What are the UESH conditions?
UESH conditions are expressions that check to see if the target variables satisfy them, and if they do, will return the test as successful.
For example, take "$count eq 5". If the $count variable equals 5, the condition is satisfies. If it doesn't, it isn't satisfied.
[!WARNING] Currently, only the
if
command supports this feature.
Available conditions
Condition | Syntax | Description |
---|---|---|
eq |
| The first variable equals the second |
neq |
| The first variable doesn't equal the second |
les |
| The first variable is less than the second |
gre |
| The first variable is greater than the second |
lesoreq |
| The first variable is less than or equal to the second |
greoreq |
| The first variable is greater than or equal to the second |
fileex |
| The file exists |
filenex |
| The file doesn't exist |
direx |
| The directory exists |
dirnex |
| The directory doesn't exist |
has |
| The first variable contains the second |
hasno |
| The first variable doesn't contain the second |
ispath |
| The first variable is a path |
isnotpath |
| The first variable is not a path |
isfname |
| The first variable is a filename |
isnotfname |
| The first variable is not a filename |
sane |
| The first variable's SHA256 hash is the same as the specified hash |
insane |
| The first variable's SHA256 hash is not the same as the specified hash |
fsane |
| The file's SHA256 hash is the same as the specified hash |
finsane |
| The file's SHA256 hash is not the same as the specified hash |
Last updated