hhmx.de

Wyatt (🏳️‍⚧️♀?)

· Föderation EN Di 27.08.2024 13:33:11

@gremlins @darkuncle @b0rk orrr, if you are using an actual posix shell…

(expression) || (echo 'error: thingy happened wrong'; break)

will solve most of these 'issues'.
except unset variables. You should always set any variables you plan to use or check for their existance at the start of a script anyway, especially if you ever used csh you know why.

Oriel Jutty

Föderation EN Di 27.08.2024 15:06:44

@wyatt8740 break in a subshell? Where does that work?