We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I could not help but notice that there seems to be an issue while trying to use "-neq" as the "not equal" operator.
I am now seeing that the correct "not equal" operator should be either "!=" or "-ne", but it says that the "not equal" operator should be "-neq", according to the chart provided in the bash shell guide provided: http://www.panix.com/~elflord/unix/bash-tute.html (underneath the section entitled "A brief summary of test operators").
Just thought I'd point out the typo! :) It might throw off other beginners like me.
(Anyway, is there any real difference between "=" and "-eq", other than that you cannot use "-eq" on strings? Just wondering if anyone knows off the top of their head.)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
More on Conditionals
You are viewing a single comment's thread. Return to all comments →
I could not help but notice that there seems to be an issue while trying to use "-neq" as the "not equal" operator.
I am now seeing that the correct "not equal" operator should be either "!=" or "-ne", but it says that the "not equal" operator should be "-neq", according to the chart provided in the bash shell guide provided: http://www.panix.com/~elflord/unix/bash-tute.html (underneath the section entitled "A brief summary of test operators").
Just thought I'd point out the typo! :) It might throw off other beginners like me.
(Anyway, is there any real difference between "=" and "-eq", other than that you cannot use "-eq" on strings? Just wondering if anyone knows off the top of their head.)