Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
syntax:expansion:intro [2009/02/24 06:26]
127.0.0.1 external edit
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 =====
Line 37: Line 37:
     * ''​{X,​Y,​Z}''​     * ''​{X,​Y,​Z}''​
     * ''​{X..Y}''​     * ''​{X..Y}''​
 +    * ''​{X..Y..Z}''​
   * [[syntax:​expansion:​proc_subst | Process substitution]]   * [[syntax:​expansion:​proc_subst | Process substitution]]
     * ''<​( COMMAND )''​     * ''<​( COMMAND )''​
  • syntax/expansion/intro.1235456762.txt
  • Last modified: 2011/02/11 05:14
  • (external edit)