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.

Required fields*

7
  • Or unix.stackexchange.com/questions/99185/… Commented Jun 7, 2017 at 21:51
  • 1
    This could be a good reference for you to read over. linuxacademy.com/blog/linux/… Commented Jun 7, 2017 at 21:58
  • 1
    flag=False; if ! $flag ; then ... should give you an error, unless you really have a command called False. (false would be standard, however) Commented Jun 7, 2017 at 22:33
  • ... for me if [ !$flag ]; then works (no space between ! and $flag) Commented Jun 12, 2017 at 19:48
  • 1
    I have googled that if test have 2 arguments and If the first argument is ! (exclamation mark), the expression is true if, and only if, the second argument is null. i found it here Commented Jun 12, 2017 at 20:11