PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] vs.
Date: Thursday, 15 Oct 2020, 07:06:38


    > Message Posted By: Unknown
    >
    > What is the difference between the two?
    >
    >   $NAME         Replace by the value of the environment variable NAME, or by the empty string if NAME is not defined.
    >
    >   ${NAME}       Replace by the value of the environment variable NAME, or by the empty string if NAME is not defined.
    >
    > The descriptions look the same to me.

$NAME and ${NAME} are different ways to specify the
value of an environment variable.  The latter is useful
in contexts like:

  ${FOO}BAR

which expands to the value of FOO immediately followed
by BAR.

--Stan-
PREV INDEX NEXT