"Kayvan A. Sylvan" <[EMAIL PROTECTED]> writes:

| On Wed, Apr 03, 2002 at 12:51:48AM +0200, Lars Gullik Bjønnes wrote:
>> | I don't like this. This is a job best performed by an external script:
>> 
>> I do not quite agree. I think that LyX should be able to read a
>> gzipped file and to write is back as zipped using zlib
>
| Okay, then this should be added as a new feature request in bugzilla.
>
>> and can someone please explain to me the difference between ${arg} and
>> $arg...
>
| From bash.info:
>
|     The basic form of parameter expansion is ${PARAMETER}.  The value of
|     PARAMETER is substituted.  The braces are required when PARAMETER is a
|     positional parameter with more than one digit, or when PARAMETER is
|     followed by a character that is not to be interpreted as part of its
|     name.
>
| So...
>
| The following works:
>
| x="foobar"
| foo=${x}copy # foo is set to foobarcopy
| bar=$xcopy # sets bar to empty string
>
| and also the following:
>
| foo=${11} # the 11th arg
| bar=$11 # bar is set to the 1st arg followed by "1"
>
| Basically, when I use ${var}, then I don't have to think about the form
| of the variable or what follows it.

And I am not sure if I agree that this is a good thing.

IMHO if you do variable expansion use ${foo} else use $foo

using the braces can just as easily lead to silent errors as when not
using them (the braces).

-- 
        Lgb

Reply via email to