Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
syntax:expansion:intro [2011/02/11 05:14] thebonsai [Overview] |
syntax:expansion:intro [2017/03/05 18:09] (current) fgrose [Expansions and substitutions] punctuation |
||
---|---|---|---|
Line 10: | Line 10: | ||
echo "$mystring" | echo "$mystring" | ||
</code> | </code> | ||
- | The ''echo'' program definitely doesn't care about what a shell variable is. It is Bash's job to deal with the variable. Bash **expands** the string "''$myvar''" to "''Hello world''", so that ''echo'' will only see ''Hello world'', not the variable or anything else! | + | The ''echo'' program definitely doesn't care about what a shell variable is. It is Bash's job to deal with the variable. Bash **expands** the string "''$mystring''" to "''Hello world''", so that ''echo'' will only see ''Hello world'', not the variable or anything else! |
- | After all these expansions and substitutions are done, all quotes that are not meant literally (i.e. [[syntax:quoting | the quotes that marked contiguous words]], as part of the shell syntax) are removed from the commandline text, so the called program won't see them. This step is called **quote-removal**. | + | After all these expansions and substitutions are done, all quotes that are not meant literally (i.e., [[syntax:quoting | the quotes that marked contiguous words]], as part of the shell syntax) are removed from the commandline text, so the called program won't see them. This step is called **quote-removal**. |
===== Overview ===== | ===== Overview ===== |