Tsallaka zuwa abun ciki
Justice Tech School

Quoting

Double quotes allow $variable expansion, single quotes keep everything literal, and a backslash escapes one character. Always quote variables to keep spaces together.

Example
name="Ada Lovelace"
echo "Hello $name"
echo 'Hello $name'
touch "my file.txt"
ls my*
rm "my file.txt"

Result

Hello Ada Lovelace
Hello $name
my file.txt

Exercise

Print the name with expansion.

echo  $name

Quiz Test

Do single quotes expand variables?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.