Convention/standard for naming files, functions and variables

Angel Tsankov fn42551 at
Sat Jan 3 09:50:37 PST 2009

Matthew Burgess wrote:
> On Sat, 3 Jan 2009 04:08:26 +0200, "Angel Tsankov"
> <fn42551 at> wrote:
>> I'd also like to know how to name functions in shell scripts,
>> which environment variables should be lowercase and which should be
>> uppercase.
> Naming functions in shell scripts should really follow the standard
> programming convention of calling them by the verb(s) that most
> accurately
> describe what the function does.  e.g. truncate(), replace(), find().

That's reasonable, but if the name contains more than one word do you use 
lowerCamelCase, underscores, hyphens or smth else to separate the words?

> As for environment variables, standard convention is to have them in
> uppercase.

With underscores delimiting the words, right?

> Again, I'm not sure there's any particular convention or even a style
> guide for this.  There are some brief points at
> though.
Well, I think that there should be conventions for all sorts of things, 
'cause  conventions make life easier (or at least they should do so).

Does anybody have an idea why peope would mix underscores and hyphens like 
this: libpng-1.2.8-link_to_proper_libs-1.patch?

Angel Tsankov 

More information about the lfs-chat mailing list