docs: update

This commit is contained in:
Dylan Araps 2018-06-14 14:36:57 +10:00
parent c0c62478fc
commit 7c2ed4de97
1 changed files with 10 additions and 0 deletions

View File

@ -163,6 +163,16 @@ rstrip() {
### Assign and access a variable using a variable.
```sh
# First Example.
var1="world"
var2="hello_${var1}"
declare "${var2}=test_string"
printf '%s\n' "${!var2}"
# Second Example.
# Assign to a variable named after the
# value stored in '$var'.
var="test"