Convention/standard for naming files, functions and variables

Angel Tsankov fn42551 at fmi.uni-sofia.bg
Sat Jan 3 02:04:50 PST 2009


Angel Tsankov wrote:
> Is there any convention for naming files?  I understand that in most
> cases letters are lowercase but I can't figure out when to use
> underscores and when dashes.  I'd also like to know how to name
> functions in shell scripts, which environment variables should be
> lowercase and which should be uppercase.  If there is a convention or
> a standard about this stuff, I'd like to see it too.
>
The question is really about hyphens versus underscores.  So far, I've seen 
one reason in favor of each of the two characters: underscores should be 
avoided since they may not be seen when the file name is underlined; on the 
other hand, dashes should also be avoided because they are alerady used to 
distinguish command line options and thus may lead to confusion if a file 
name starts with a dash (but why would anyone put a dash at the beginning of 
a file name).

Angel Tsankov 




More information about the lfs-chat mailing list