Tag Archives: Echo

Sample debug output code for BASH/SHELL

When trying to debug your own scripts it can be difficult to see exactly what you want.  Pages of white text scrolling across the screen.  Here is a quick flexible function that can make life a whole lot easier by setting different debug values and instead of using echo, use the function name.

Copy this into a basic script and run it, adjust the debuglevel variable at the top to see different output.  I know this will help me in the future and hope it will help others as well.