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[…]
Bash
Capture last command In bash
For whatever reason you may want to save the last command you wrote. Heres a way to do so. this command allows you to only capture commands that through an error