The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Debugging shell scripts

Contributed by: Anon
This tip is valid for: Both BeOS and Haiku

All bash shell scripts must begin with the string:’

 #!/bin/sh

However, if you want to see exactly what’s going on while a script is running, start your script with


instead. The shell will report back to you with every step, making it much easier to see exactly what’s going on (and thus how to fix it if necessary).

Posted in Scripting

Comment on this tip

Comments may be incorporated into the original tip by site editors.

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.