Variable Notation ($projectdir vs ${projectdir})
- $projectdir is standard variable expansion.
- ${projectdir} uses explicit curly braces {}.
Both produce the exact same result here, but curly braces are safer when a variable is immediately followed by characters that could be valid variable names.
# Example where braces are REQUIRED:
projectdir="my_app"
# ❌ Bash looks for a variable named $projectdir_v2 (which is empty)
echo "$projectdir_v2"
# ✅ Braces separate the variable name from surrounding text
echo "${projectdir}_v2" # Outputs: my_app_v2