Shell variables Variables are local to the shell or "environment" variables Environment variables are process attributes, at OS level Local variables are not inherited by child processes The shell command "export" is used to promote a variable to the environment The shell expands an unexistent variable into an empty string Special constructs (good in scripts): Default value: ${var:-val} Default assignment: ${var:=val} Error if missing: ${var:?errmsg} Some variables carry a system-wide special meaning $PATH, for example. is known to execvp(3) and to the shell itself Many commands can be configured through environment variables The environment is a simple tool for parameter passing