Simplify the process of debugging scripts

Simplify the process of debugging scripts with this handy admin tip.

I use scripts a lot to make my life easier. When a script starts with #!/bin/sh it tells Solaris to run the script

in a bourne shell. When you put #!/bin/sh -xv as the first line, the shell echos each command to standard output along with the results of executing that command. This works with Korn and Bash shells as well, and makes debugging scripts a much simpler process.


This was first published in July 2002

Dig deeper on Software Development Methodology

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close