Есть ли разница, когда переменные называются $ variableName и $ {variableName} в bash?
1 ответ
2
От man bash
:
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.
Примеры:
echo ${10}
foo=bar
echo ${foo}bar