diff --git a/SC2308.md b/SC2308.md index c9be31e..0ddf239 100644 --- a/SC2308.md +++ b/SC2308.md @@ -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`