

We’ll make a string element $val and compare it to the string “Aqsa”. Within the “if” statement, we have declared a condition. After that, we have declared a variable “val” having a string value “Aqsa”. So, we have added the bash extension first.
NOT EQUAL SYMBOL CODE
Now write the code shown in the image below within your bash file. You will see that the newly created bash file will be opened via GNU editor. So, we have made a bash file named “test.sh” with the built-in “touch” query as below. The terminal app has been launched successfully we will create a new bash file to save the bash code within it. Alternatively, you can explore it from the Activity menu bar and search it using the search bar. After the successful login, launch the console application named “terminal” at your desktop by “Ctrl+Alt+T”. In our case, we have been working on Ubuntu 20.04. For this purpose, let’s login from the Linux operating system first.

Let’s see how not equal sign works in bash. The not equal expression is often used in conjunction only with if or elif expressions to check for equality and run instructions. The not equal operation yields a boolean result of True or False. In addition, for the not equal expression to operate, it must be enclosed by brackets ]. The exclamation point, i.e., “!=” is also commonly used in certain computer languages to indicate that something is not equal. The not equal function in Ubuntu bash is denoted by the symbol “-ne,” which would be the initial character of “not equal.” Also included is the “!=” operator that is used to indicate the not equal condition. The not equal “-ne” controller inside the Linux Bash programming language compares two possible values when they’re not equivalent.
