bash if larger than
-eq
is equal to
if [ "$a" -eq "$b" ]
-ne
is not equal to
if [ "$a" -ne "$b" ]
-gt
is greater than
if [ "$a" -gt "$b" ]
-ge
is greater than or equal to
if [ "$a" -ge "$b" ]
-lt
is less than
if [ "$a" -lt "$b" ]
-le
is less than or equal to
if [ "$a" -le "$b" ]# In bash, you should do your check in arithmetic context:
if (( a > b )); then
...
fi
# For POSIX shells that don't support (()), you can use -lt and -gt.
if [ "$a" -gt "$b" ]; then
...
fi
Also in C++:
- fish script set variable
- set head of branch at specific commit
- anaconda for ubuntu 20.04
- conda install sklearn 0.20
- pycharm ubuntu download
- shell script sh
- how to know the shell version in ubuntu
- git abort merge
- check maven version in ubuntu
- screenshot to clipboard ubuntu 20
- choco upgrade all
- how to install sublime in ubuntu 20.04 using terminal
- delete first column bash
- angular install firebase tools
- update software in ubuntu
- how to execute docker command in shell script
- react hook install
- Package 'docker-ce' is not installed, so not removed
- ubuntu move folder to another directory
- install composer in dockerfile
- docker cp volume
- mkdir command
- youtube music download ubuntu
- kill user sessions in centos7