Bash conditional statements
We'll cover the following...
We'll cover the following...
Bash if-else
To compare integers we use can the following operators:
| Operator | Description | 
|---|---|
| -eq | Equal to | 
| -ne | Not equal to | 
| -gt | Greater than | 
| -ge | Greater than OR equal to | 
| -lt | less than | 
| -le | less than OR equal to | 
The following example shows how to use the number comparison operators in an if statement.
Shell
Files
bash bash-ifelse.sh 0
Bash elif is ...