Current Issue


Table of contents

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 12.0

Version 12.0 delivers every issue of Sys Admin from 1992 through 2006 and every
issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!

Sys Admin Magazine > Archives > 1998 > 9803

Shell Objects

Christopher A. Jones

Maintaining UNIX systems often involves programming. Unlike programming for application development, a compiled language usually isn't appropriate to perform routine system tasks. The usual tool for such tasks is a scripting language such as the Korn shell, which can help automate the countless configurations, updates, file distributions, and statistic gathering that's required in system administration. It is rarely the case that a UNIX machine is alone, and as a result, network-wide shell programming definitely has its complications. Every flavor of UNIX varies slightly in its architecture. While most features are present, file paths and command syntax often vary from machine to machine. These variations complicate network-wide tasks such as copying a network-wide version of inetd.conf to multiple systems or tracking stats from syslog.

Although shell programming can be powerful, it can also seem inefficient if you make frequent calls to standard UNIX tools, or have to write several different versions of your script for different systems on your network. It's easy to picture shell scripts as a simple string of UNIX commands, and to many, that is solely what they're used for, but shell scripts can be much more. If you've tried to perform a network-wide system change, or gather statistics, you've probably started with a list of host machines, and then executed a remsh command to each one, and collected your data or issued your command. Upon retrieving the information or evidence of the change, you may run awk or grep through the resulting file to pull out the information needed. Although this works, it can involve rewriting the script several times, or weighing it down with case statements to meet the differences of the machines on your network.




MarketPlace

Download Award-Winning Service Desk software, Free
Try Numara FootPrints 9, The ITSM software that Delivers Real Value, Flexibility and Results.

Instant Answers to Your IT & Business Questions
Sign Up & Get Full Access To The Definitive Online Book Collection With SkillSoft's Books24x7�.

BugSplat - Automatic Crash Analysis
Fast online exception analysis. Capture customer crash data online.

Visit Dell� Small and Medium Business Online Store
One Stop to Buy All Your Business IT Solutions. Browse Through Dell's Best Deals Online Now!

Wanna see your ad here?