From dbb858281a8c5948606ad3a07225915954a03953 Mon Sep 17 00:00:00 2001 From: kfrncs Date: Fri, 20 Jul 2018 14:38:59 -0400 Subject: missing $ on line 77 - $Length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Maybe just a zsh quirk? ➜ ~ echo ${Variable:0:Length} zsh: unrecognized modifier --- bash.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3