Well, the reason I haven't done that is that ```command``` is not necessarily a single command, but could be a whole script. So I didn't want to assume anything on it. For instance, it could have been:
```
/usr/bin/bmc foo bar; echo foo > /sys/bar
```
in which case the check for 127 wouldn't help.

But if it's too over-engineered, I can go back and simplify things with your suggestion.