mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
missing $ on line 77 - $Length
Maybe just a zsh quirk? ➜ ~ echo ${Variable:0:Length} zsh: unrecognized modifier
This commit is contained in:
parent
0d211d3419
commit
dbb858281a
@ -74,7 +74,7 @@ echo ${Variable/Some/A} # => A string
|
|||||||
|
|
||||||
# Substring from a variable
|
# Substring from a variable
|
||||||
Length=7
|
Length=7
|
||||||
echo ${Variable:0:Length} # => Some st
|
echo ${Variable:0:$Length} # => Some st
|
||||||
# This will return only the first 7 characters of the value
|
# This will return only the first 7 characters of the value
|
||||||
|
|
||||||
# Default value for variable
|
# Default value for variable
|
||||||
|
Loading…
Reference in New Issue
Block a user