diff --git a/DBUG-output.sh b/DBUG-output.sh new file mode 100644 index 0000000..43b9c2d --- /dev/null +++ b/DBUG-output.sh @@ -0,0 +1,15 @@ +# Set debug flag as desired +DEBUG=1 +# DEBUG=0 + +if [ "$DEBUG" -eq "1" ]; then + OUT='/dev/tty' +else + OUT='/dev/null' +fi + +# actual script use commands like this +command > $OUT 2>&1 + +# or like this if you need +command 2> $OUT \ No newline at end of file