Jean-Marc Lasgouttes wrote:

>>>>>>"Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
>>>>>>
> 
> Lars> Andre is not the whole world.
> 
> Lars> I read a lot of shell scripts and this contruct is not often
> Lars> used. (it is often used, but almost never for plain variables)
> 
> Again:
> 
> ${foo}
> 
> - it does not hurt
> 
> - it works always


Yes. I would add to this list:

- it is conform to makefile syntax

Because it is so easy to mix make and shell files
I'm using ${foo} because the "context switch"
between both worlds is easier.

And sometimes I'm using constructs like

${foo:="foo"} or ${foo:-"foo"}.

Those constructs match better if I'm using ${foo} too.


> $foo
> 
> - less typing. Better if you are lazy
> 
> It is like adding const everywhere in C++: you rarely _need_ it, but
> somehow it is better and helps in the long run.


Greetings,

Stephan

------------------------------------------------
<[EMAIL PROTECTED]> | beusen Solutions GmbH
fon: +49 30 549932-426   | Landsberger Allee 366
fax: +49 30 549932-921   | 12681 Berlin, Germany
------------------------------------------------

Reply via email to