[lttng-dev] [PATCH] runtests: Make path of time binary configurable

Raphaël Beamonte raphael.beamonte at polymtl.ca
Thu Nov 15 00:59:48 EST 2012


>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20121115/1f8e52b2/attachment.html>


More information about the lttng-dev mailing list