Differences

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

Link to this comparison view

Both sides previous revision Previous revision
syntax:pe [2018/06/22 13:49]
csb [Case modification: Arrays] [2] should point to SOME and not to TEXT in the array
syntax:pe [2018/07/24 19:53] (current)
nicolae Fixed typo
Line 78: Line 78:
 __Why does the first one fail?__ It prints nothing, because a parameter (variable) named "''​WORDs''"​ is undefined and thus printed as ""​ (//​nothing//​). Without using braces for parameter expansion, Bash will interpret the sequence of all valid characters from the introducing "''​$''"​ up to the last valid character as name of the parameter. When using braces you just force Bash to **only interpret the name inside your braces**. __Why does the first one fail?__ It prints nothing, because a parameter (variable) named "''​WORDs''"​ is undefined and thus printed as ""​ (//​nothing//​). Without using braces for parameter expansion, Bash will interpret the sequence of all valid characters from the introducing "''​$''"​ up to the last valid character as name of the parameter. When using braces you just force Bash to **only interpret the name inside your braces**.
  
-Also, please remember, that **parameter names are** (like nearly everything in UNIX(r)) **case ​sentitive!**+Also, please remember, that **parameter names are** (like nearly everything in UNIX(r)) **case ​sensitive!**
  
 The second form with the curly braces is also needed to access positional parameters (arguments to a script) beyond ''​$9'':​ The second form with the curly braces is also needed to access positional parameters (arguments to a script) beyond ''​$9'':​
  • syntax/pe.txt
  • Last modified: 2018/07/24 19:53
  • by nicolae