From d845a09177274ccb283ca626528ac2ac25f25d6a Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Sun, 15 Sep 2019 17:21:59 +0000 Subject: [PATCH] 'DBUG-output.sh' toevoegen --- DBUG-output.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 DBUG-output.sh 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