Timeline for bash if not multiple conditions without subshell?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Jun 1, 2022 at 14:14 | history | suggested | Serious Angel | CC BY-SA 4.0 |
Some might prefer a group inverse
|
| Jun 1, 2022 at 1:38 | review | Suggested edits | |||
| S Jun 1, 2022 at 14:14 | |||||
| S May 31, 2022 at 13:18 | history | suggested | Serious Angel | CC BY-SA 4.0 |
It is possible to declare multiple expressions in a single test
|
| May 30, 2022 at 18:39 | review | Suggested edits | |||
| S May 31, 2022 at 13:18 | |||||
| Dec 3, 2015 at 18:54 | history | edited | DopeGhoti | CC BY-SA 3.0 |
Boolean Oops
|
| Dec 3, 2015 at 18:54 | comment | added | DopeGhoti | It must be Thursday. I never could get the hang of Thursdays. Corrected, and I will leave my foot-in-mouth for posterity. | |
| Dec 3, 2015 at 18:52 | comment | added | cuonglm |
@DopeGhoti: not (a and b) is the same as (not a) or (not b). See en.wikipedia.org/wiki/De_Morgan%27s_laws
|
|
| Dec 3, 2015 at 18:51 | comment | added | Wildcard |
@DopeGhoti, cuonglm is right. It's if not (all files there) so when you split it up this way you need || instead of &&. See my first comment below my question itself.
|
|
| Dec 3, 2015 at 18:47 | comment | added | DopeGhoti |
The test is not "are any of the files not there", the test is "are none of the files there". Using || would execute the predicate if any of the files are not present, not if and only iff all of the files are not present. NOT( A AND B AND C) is the same as (NOT A) AND (NOT B) AND (NOT C); see the original question.
|
|
| Dec 3, 2015 at 18:43 | comment | added | cuonglm |
You need || instead of &&
|
|
| Dec 3, 2015 at 18:41 | history | answered | DopeGhoti | CC BY-SA 3.0 |