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 last published in July 2002

Dig Deeper on Software Development Methodology

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close