please keep the line length below 75 characters. thank you.

# [EMAIL PROTECTED] / 2002-12-12 07:59:22 -0500:
>  I am having trouble understanding what is the difference between
>  "$variable" and "${variable}".

    if the variable name is really "variable", then none.
 
>  I have read sh(1) and understand than ${} is a "parameter" and can
>  contain more than just a variable, but browsing through /etc/rc I see
>  lots of "${variable}" (i.e. "case ${svc_val} in").
> 
>  Is this just for readability or is there some functional difference?

     sh(1):

     The simplest form for parameter expansion is:
                           ^^^^^^^^^^^^^^^^^^^
           ${parameter}

     The value, if any, of parameter is substituted.
     The parameter name or symbol can be enclosed in braces, which are
                                  ^^^   
     optional except for positional parameters with more than one digit
     ^^^^^^^^
     or when parameter is followed by a character that could be
     interpreted as part of the name.

     so yes, it's mostly a matter of style.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.    see http://www.eyrie.org./~eagle/faqs/questions.html

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to