How would you implement logical operators in DOS Batch files?
컴퓨터관련
Logical operators (“and”, “or”) in DOS batch...펌
맘편한넘
2015. 7. 30. 20:46
Logical operators (“and”, “or”) in DOS batch
|
You can do
or:
You can do
| |||||||||
|
The MS-DOS
If See also: | ||||
De Morgan's laws allow us to convert disjunctions ("OR") into logical equivalents using only conjunctions ("AND") and negations ("NOT"). This means we can chain disjunctions ("OR") on to one line. This means if name is "Yakko" or "Wakko" or "Dot", then echo "Warner brother or sister".
This is another version of paxdiablo's "OR" example, but the conditions are chained on to one line. (Note that the opposite of
|