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 :: elasticsearch get indices regex 
Shell :: git commit messages 
Shell :: how to set up git user 
Shell :: git current branch 
Shell :: bash count elements in string 
Shell :: see network trafic linux 
Shell :: k8s set default namespace 
Shell :: docker remove dangling images 
Shell :: get all pods in a node kubectl 
Shell :: git rename local branch 
Shell :: edit path linux 
Shell :: install latest i18next version 
Shell :: install latest node js ubuntu 
Shell :: dotnet format install 
Shell :: how to create new repository in github 
Shell :: tr unix use 
Shell :: git pull onbly submodule 
Shell :: haskell change version 
Shell :: check user shell in linux 
Shell :: grep lines between two patterns in unix 
Shell :: javascript to exe 
Shell :: unattended-upgr 
Shell :: openssl check certificate expiration 
Shell :: delete a github repository using curl 
Shell :: generate github access token 
Shell :: install drush on ubuntu 18.04 
Shell :: if there is a string in a file batch 
Shell :: get docker container version from inside container 
Shell :: boost volume in ubuntu 18.04 
Shell :: install anaconda 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =