> > If I understand correctly, it is not an environment variable until you > export it (thus make it available to child processes). There is such a > thing plain variable, there is just one big scope. I think there is > not a single right way to do this, but I tend to agree with the SO > answer below. By using capitalized names, you risk interfering with > important environment variables. It would be a shame to do > PATH="/tmp/something" by accident. > > The answer I am referring to: > > http://stackoverflow.com/questions/673055/correct-bash-and-shell-script-variable-capitalization > . >
I approve what Simon says. There is no real convention, and it is common to use "_"-separated variables names for non-exported ones, to be able to distinguish which one was/will be exported. In fact, it is also "promoted" by this book : http://goo.gl/IBFza (read full paragraph, there is a part on the next page) On the other hand, it is commonly said that if you work on a bash script that already has a convention, you have to be consistent to it.
_______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
