rtl_433/tests/exitcode-for-output.sh
2019-11-08 13:20:21 +01:00

6 lines
129 B
Bash
Executable file

#!/bin/sh
# execute command and set exit code 1 if there is output on stdout or stderr
out=$($@ 2>&1)
echo "$out"
[ -z "$out" ]