summaryrefslogtreecommitdiffhomepage
path: root/bash.html.markdown
diff options
context:
space:
mode:
authorkfrncs <kennethpatrickfrancis@gmail.com>2018-07-20 14:38:59 -0400
committerGitHub <noreply@github.com>2018-07-20 14:38:59 -0400
commitdbb858281a8c5948606ad3a07225915954a03953 (patch)
tree5692942f6a1a5f34152960d5f6dadb662192e50a /bash.html.markdown
parent0d211d341913305bd1d97e5d097898eb7faa1354 (diff)
missing $ on line 77 - $Length
Maybe just a zsh quirk? ➜ ~ echo ${Variable:0:Length} zsh: unrecognized modifier
Diffstat (limited to 'bash.html.markdown')
-rw-r--r--bash.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index 3f3e49eb..d1e6bf25 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -74,7 +74,7 @@ echo ${Variable/Some/A} # => A string
# Substring from a variable
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
# Default value for variable