7
什么时候需要在外壳变量周围花括号?
在shell脚本中,{}何时扩展变量时使用? 例如,我看到了以下内容: var=10 # Declare variable echo "${var}" # One use of the variable echo "$var" # Another use of the variable 是否存在重大差异,还是仅仅是样式?是一个比另一个更好的选择吗?
657
bash
shell
syntax
curly-braces