2 added 55 characters in body
source | link

I'm guessing they are both equivalent, when a variable is used in the form:

${HOME}

the curly braces serve to delimit the variable WORD when it would otherwise be indistinguishable from another WORD directly adjacent. e.g.

echo $HOMEahoy

would produce nothing (except the newline from the echo)

echo ${HOME}ahoy 

would echo your home path like you expect plus ahoy.
I suspect in this case the {} are unnecessary because =:/ are likely not valid variable characters in bash so, bash can work out the WORD boundaries itself.
When shell scripting, if in doubt I always put in the curly braces.
The idea is not limited to (actuallybash e.g. PHP has similar behaviours - except in PHP they take thea slightly different form e.g. {$VAR_NAME}

I'm guessing they are both equivalent, when a variable is used in the form:

${HOME}

the curly braces serve to delimit the variable WORD when it would otherwise be indistinguishable from another WORD directly adjacent. e.g.

echo $HOMEahoy

would produce nothing (except the newline from the echo)

echo ${HOME}ahoy 

would echo your home path like you expect plus ahoy.
I suspect in this case the {} are unnecessary because =:/ are likely not valid variable characters in bash so, bash can work out the WORD boundaries itself.
When shell scripting, if in doubt I always put in the curly braces (actually PHP has similar behaviours - except in PHP they take the form {$VAR_NAME}

I'm guessing they are both equivalent, when a variable is used in the form:

${HOME}

the curly braces serve to delimit the variable WORD when it would otherwise be indistinguishable from another WORD directly adjacent. e.g.

echo $HOMEahoy

would produce nothing (except the newline from the echo)

echo ${HOME}ahoy 

would echo your home path like you expect plus ahoy.
I suspect in this case the {} are unnecessary because =:/ are likely not valid variable characters in bash so, bash can work out the WORD boundaries itself.
When shell scripting, if in doubt I always put in the curly braces.
The idea is not limited to bash e.g. PHP has similar behaviours - except in PHP they take a slightly different form e.g. {$VAR_NAME}

1
source | link

I'm guessing they are both equivalent, when a variable is used in the form:

${HOME}

the curly braces serve to delimit the variable WORD when it would otherwise be indistinguishable from another WORD directly adjacent. e.g.

echo $HOMEahoy

would produce nothing (except the newline from the echo)

echo ${HOME}ahoy 

would echo your home path like you expect plus ahoy.
I suspect in this case the {} are unnecessary because =:/ are likely not valid variable characters in bash so, bash can work out the WORD boundaries itself.
When shell scripting, if in doubt I always put in the curly braces (actually PHP has similar behaviours - except in PHP they take the form {$VAR_NAME}