Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

217 votes
3 answers
105k views

$VAR vs ${VAR} and to quote or not to quote

I can write VAR=$VAR1 VAR=${VAR1} VAR="$VAR1" VAR="${VAR1}" the end result to me all seems about the same. Why should I write one or the other? are any of these not portable/POSIX?
xenoterracide's user avatar