rtl_433/tests/exitcode-for-output.sh

7 lines
131 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" ]