Why it matters: Correct quoting avoids accidental word-splitting and globbing. Safer scripts start with "$var"
.
Why it matters: Quoting controls how Bash expands variables and splits words. Using quotes correctly prevents bugs.
#!/bin/bash
name="Chris App"
echo Hello $name
echo "Hello $name"
echo 'Hello $name'
today=$(date +%F)
echo "Today is $today"
nums=(10 20 30)
echo "First: ${nums[0]}"
echo "All: ${nums[@]}"
export MODE=prod
env | grep MODE