More on Conditionals

  • + 2 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.)