Add "Name a variable based on another variable" entry

This commit is contained in:
Crestwave
2019-01-19 18:19:19 +08:00
parent f47fd69d3b
commit 2849a05463
2 changed files with 19 additions and 0 deletions

View File

@@ -27,5 +27,14 @@ $ printf '%s\n' "$ref"
value
```
## Name a variable based on another variable
```shell
$ var="world"
$ declare hello_$var=value
$ printf '%s\n' "$hello_world"
value
```
<!-- CHAPTER END -->