bash if greater 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
...
fiif (( a > b )); then
...
fi
#Use above example or below one:
if [ "$a" -gt "$b" ]; then
...
fi
Also in C++:
- git merge abort
- substring if statement variable shell script
- how to instal psql linux
- wait-on yarn
- get info about an audio file ffmpeg
- typescript css modules in react
- - laravel/installer is locked to version v3.2.0 and an update of this package was not requested.
- how to exit bash in container
- linux install toilet
- path to flutter linux
- bash list the top ten largest values in a column
- linux install sass
- linux tar command
- linux history command
- amazon linux 2 install stress
- kill user sessions in centos7
- vim jump to beginning of line
- install curl mac
- compressed-raw-lzma kali install
- install wheel
- How to Install Julia on Ubuntu
- navigate to end shell
- sshfs
- install tree in linux