What is the difference between using and not using {}
with the $variable
in bash?
In the two statements below, which one is modern and recommended way write bash script (bash version 3.2+ above)
[~]$ variable=hello
[~]$ echo "$variable world"
hello world
[~]$ echo "${variable} world"
hello world