Contents
How do you write not equal to in Linux?
String Operators
[ $a = $b ] is not true. Checks if the value of two operands are equal or not; if values are not equal then the condition becomes true. [ $a != $b ] is true.
Is not equal to in bash?
It happens to be a Bash built-in command, so it’s documented in the Bash manual. … Following the reference to “Bash Conditional Expressions” will lead you to the description of -ne , which is the numeric inequality operator (“ne” stands for “not equal). By contrast, != is the string inequality operator.