-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Marquetecken wrote:
> Hi,
> 
> Are there some naming conventions on writing shell scripts ?, like a
> prefix for a function and so on.
> If so where can i find some info on this.

Firstly, I'd follow Adrien's advice and 'emerge abs-guide'.  It's a great guide
for learning bash scripting.

As far as naming conventions go, the following is a very small list of what I
can think of off the top of my head.  I do not know of any docs that list
naming conventions for shell scripting.

 - global variables should be all caps while local variables should be all
lowercase
 - *DO NOT* use '-' as a separator for identifiers.  While bash supports it
(when not invoked in posix mode), most shells do not.  For example instead of
naming a function 'foo-bar()', use 'foo_bar()' instead.

HTH
- --
BOFH Excuse #191:

Just type 'mv * /dev/null'.

Aaron Walker <[EMAIL PROTECTED]>
[ Gentoo/BSD | cron | forensics | shell-tools | commonbox | netmon ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCBxStC3poscuANHARAs1yAKCgLPCgZDRtP3PzQfSVYQQSVb4xIQCfdKze
520ABIGnytYQTIzpOFtcqxg=
=NxKo
-----END PGP SIGNATURE-----


--
[email protected] mailing list

Reply via email to