Variable Expansion

Noun · Development

Definitions

  1. The shell mechanism that replaces a variable reference ($VAR or ${VAR}) with its value before executing a command. Supports default values (${VAR:-default}), substring operations, and pattern substitution.

    In plain English: When the shell replaces $VARIABLE_NAME with its actual value before running your command, like filling in blanks in a template.

    Example: "Always quote your variable expansions — unquoted $FILE will break on filenames with spaces."

Related Terms