ShBash · Lesson 2 of 8
Variables & Input
Bash variables have no types. Everything is a string. This is either simple or chaos, depending on what you're trying to do with numbers.
⚠ Warning
Always quote your variables: use "$name" not $name. Unquoted variables are subject to word splitting and glob expansion, which causes subtle, hard-to-debug bugs when values contain spaces or special characters.
Always quote your variables: use "$name" not $name. Unquoted variables are subject to word splitting and glob expansion, which causes subtle, hard-to-debug bugs when values contain spaces or special characters.