| 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...
|