wierd situation with nested conditions

simply because this condition block is in the end of its parent block this OR

gets hit, but if I put it above the last line

everything works fine;

when I did this (the condition goes through), everything works fine

I realized that when you want to exit within a condition, you must use a classic if statement

not this

in doing so you get an error status of 1

this is correct

https://fabianlee.org/2020/10/14/bash-using-logic-expressions-as-a-shorthand-for-if-then-else-control/

when using this type of condition, if anything returns back a non 0 result, the status ends up being that.

Leave a Reply

Your email address will not be published.