Unix Shell - Any shell best practise?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > August 2007 > Any shell best practise?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Any shell best practise?
Guofu Chen

2007-08-21, 1:21 pm

Hi all,

I am learning Linux command line and I found it is quite useful and
interesting. Is there some best practise that I can use to get familiar with
command? Thanks!


Michael Vilain

2007-08-21, 1:21 pm

In article <faes4c$mbl$1@aioe.org>, "Guofu Chen" <itcecsa@gmail.com>
wrote:

> Hi all,
>
> I am learning Linux command line and I found it is quite useful and
> interesting. Is there some best practise that I can use to get familiar with
> command? Thanks!


Read the script programming books for the shell you'll be using. Review
other's shell scripts to see how they wrote them. If there's some local
coding standard, follow it.

Program shell scripts to the "least common denominator". On commericial
UNIX boxen, that's the Borne shell (sh). Linux uses the Borne-Again
shell (bash). Don't use the expanded features of bash unless you're
fairly certain that scripts won't be ported to other environments.
Standardized sh scripts can run everywhere. Not so with bash or ksh
scripts. Some environments don't have these shells installed right out
of the box or they're installed in a non-standard place (e.g. /opt).

If more than one person is writing shell scripts, use a source control
system like rcs or sccs to maintain "who's doing what" scripts at any
one time.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com