More typos

This commit is contained in:
Michael Hienle 2018-07-20 12:25:16 +02:00 committed by GitHub
parent 876b845840
commit b235bb2d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -119,15 +119,15 @@ Parameter expansions
name="John" name="John"
echo ${name} echo ${name}
echo ${name/J/j} #=> "john" (substitution) echo ${name/J/j} #=> "john" (substitution)
echo ${name:0:2} #=> "jo" (slicing) echo ${name:0:2} #=> "Jo" (slicing)
echo ${name::2} #=> "jo" (slicing) echo ${name::2} #=> "Jo" (slicing)
echo ${name::-1} #=> "Joh" (slicing) echo ${name::-1} #=> "Joh" (slicing)
echo ${food:-Cake} #=> $food or "Cake" echo ${food:-Cake} #=> $food or "Cake"
``` ```
```bash ```bash
length=2 length=2
echo ${name:0:length} #=> "jo" echo ${name:0:length} #=> "Jo"
``` ```
See: [Parameter expansion](http://wiki.bash-hackers.org/syntax/pe) See: [Parameter expansion](http://wiki.bash-hackers.org/syntax/pe)