Updated SC2124 (markdown)

koalaman
2015-06-14 16:44:56 -07:00
parent d71f429fff
commit b726968973

@@ -32,6 +32,8 @@ If you want to assign N elements as N elements, use an array, e.g. `myArray=( "$
If you want to assign N elements as 1 element by concatenating them, use `*` instead of `@`, e.g. `myVar=${myArray[*]}` (this separates elements with the first character of `IFS`, usually space). If you want to assign N elements as 1 element by concatenating them, use `*` instead of `@`, e.g. `myVar=${myArray[*]}` (this separates elements with the first character of `IFS`, usually space).
The same is true for `${@: -1}`, which results in 0 or 1 elements: `var=${*: -1}` assigns the last element or an empty string.
### Exceptions ### Exceptions
None. None.