Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Some shells do not accept the double equal sign. Commented Feb 25, 2012 at 12:19
  • 1
    The question was about bash. I'm using bash. Works well for me. What exactly You are speaking about ? Commented Feb 25, 2012 at 13:03
  • 3
    If you're using Bash, you should use double square brackets. My previous comment was a simple statement of fact for those who might read your answer and be using a different shell. Commented Feb 25, 2012 at 15:49
  • single square brackets are ok in this case, please see serverfault.com/questions/52034/… Commented Aug 31, 2012 at 19:21