HP3000-L Archives

April 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
cLIeNUX user <[log in to unmask]>
Reply To:
cLIeNUX user <[log in to unmask]>
Date:
Wed, 12 Apr 2000 03:27:02 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (70 lines)
dwmyers@my-deja.com...
>In article <[log in to unmask]>,
>Peter H.M. Brooks <[log in to unmask]> wrote:
>> I have found the GNU style guide that covers style for makefiles,
>> but I am really looking for a short, elegant style guide for shell
>> scripts in general, in particular for POSIX shell scripts. If the
>> guide also covers perl, awk, and suchlike so much the better.
>>
>> I just want to avoid re-inventing the wheel. I am sure that such a
>> beast exists in various forms all over the place, but I can't put my
>> hand on one.
>>
>
>They do exist, Peter, I used one when I was working for Lanier. Kelly
>Smith et al. wrote a pretty good guide, but it was an internal
>document. I've been to a number of places since, and I haven't found
>a document as of yet.
>
>Nemeth et al. devote a chapter to startup and shutdown and they talk
>extensively in it about things to do with those kinds of scripts;
>the Unix instance itself will have many scripts of that kind that
>can serve as examples.
>
>Eileen Freish's Essential Systems Administration has a small number
>of shell scripts, but I think the ones she presents can be better
>coded. I don't find it to be optimal practice to write
>
>line one >> $logfile
>line two >> $logfile
>line three >> $logfile
>
>when
>
>{
>  line one
>  line two
>  line three
>} >> $logfile
>
>works.
>
>I can say though that if you go to the Direct Hit engine and enter
>"shell scripting standards" you get a lot of interesting hits. One
>of those is Heiner's SHELLdorado:
>
>http://www.oase-shareware.orh/shell
>
>which does include a number of example of good and bad coding practice.
>
>David.
>

Torvalds' linux/Documentation/CodingStyle or whatever it is in the
Linux sources is very good, and very general. The things he says
about commenting are the same things said by prominent Forth
programmers, which is a rather broad span.

To re-iterate, comments are WHAT the code does, the code itself is HOW.

Rick Hohensee
cLIeNUX user 0





>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

ATOM RSS1 RSS2