Cleaned up and merge other Linux snippit repo
Meged https://git.bprieshof.nl/brammp/linux into ./Linux
This commit is contained in:
15
Linux/Script-examples/DBUG-output.sh
Normal file
15
Linux/Script-examples/DBUG-output.sh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user