Writing Better Shell Scripts – Part 1

Posted by jwright on Jun 15, 2010 3:10 PM EDT
Innovations Technology Solutions; By Jeremy Mack Wright
Mail this story
Print this story

This post is the first in a series on shell script debugging, error handling, and security. Although I’ll be presenting some methodologies and techniques that apply to all shell languages (and most programming languages), this series will focus very heavily on BASH. Users of other shells like CSH will need to do some homework to see what information transfers and what does not. One of the difficulties with debugging a shell script is that BASH typically doesn’t give you very much information to go on. You might get error output showing a line number, but that’s just the line where the shell became aware of the error, not necessarily the line where the error actually occurred. Add in a vague error message such as the one in Listing 1, and it gets difficult to tell what’s going on inside your script.

Full Story

» Read more about: Story Type: Tutorial

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.