mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2308 (markdown)
@@ -63,7 +63,7 @@ otherwise, you can find the index of the first `=` using parameter expansion and
|
||||
```
|
||||
str="mykey=myvalue"
|
||||
x=${str%%=*} # Assign x="mystr"
|
||||
index=$((x+1)) # Add 1 to length of x
|
||||
index=$((${#x}+1)) # Add 1 to length of x
|
||||
```
|
||||
|
||||
#### `substr`
|
||||
|
Reference in New Issue
Block a user