Answers for "bash not equal"

1

bash not equal

[ VALUE1 -ne VALUE2 ]
Posted by: Guest on September-23-2021
0

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
Posted by: Guest on September-23-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language