is there a way how I can suppress the console output of sdterr but keep the exit code?
I did
#!/bin/sh
command 2> /dev/null
STATUS=$?
but that way, even the exit code is suppressed (and turns into 0).
I want to achieve that I can get when a command fails without clustering the console unless a --verbose flag is enabled but it should quit the program when a command fails.