variable
Try it yourself →Stores a value; read with $.
Syntax
name=value
Description
NO spaces around = during assignment. Put $ in front to read the value. Double quotes expand, single quotes leave it as is.
Example
name="Alex" echo "Hello $name"
Expected output
Hello Alex
When to use?
Storing all kinds of data.
Common mistakes
- ⚠️ name = value WRONG (no spaces); name=value correct.