Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash if greater than

if (( a > b )); then
    ...
fi
#Use above example or below one:
if [ "$a" -gt "$b" ]; then
    ...
fi
Comment

bash if larger than

# 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
Comment

PREVIOUS NEXT
Code Example
Shell :: how to change permissions on a file in linux 
Shell :: add all changes and commit in git 
Shell :: install rsync 
Shell :: install docker wsl 
Shell :: docker command not available in ubuntu wsl 
Shell :: set email git 
Shell :: add user to group linux 
Shell :: linux go to home directory 
Shell :: linux show uid 
Shell :: git get remote branches 
Shell :: windows terminal starting directory 
Shell :: bc add 
Shell :: install magento 2 command line composer 
Shell :: xcode There is not enough disk space available to install the product. 
Shell :: run springboot as a service linux 
Shell :: how to exit git rebase 
Shell :: curl ssl verify false c 
Shell :: how to cd into local machine using ubuntu subsystem 
Shell :: fatal error: ft2build.h: No such file or directo 
Shell :: how to get rid of activate windows watermark 2021 
Shell :: git code push 
Shell :: wsl home folder location 
Shell :: apt search installed package 
Shell :: shell script while loop example 
Shell :: install csv 
Shell :: how to check the parent branch in git 
Shell :: random hex chars bash 
Shell :: git remember credentials ubuntu 
Shell :: pause bash script 
Shell :: linux install nvm 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =