summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bash.html.markdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index e0c12f97..81f85d28 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -59,7 +59,8 @@ echo ${VARIABLE/Some/A}
# This will substitute the first occurance of "Some" with "A"
# Substring from a variable
-echo ${VARIABLE:0:7}
+LENGTH=7
+echo ${VARIABLE:0:LENGTH}
# This will return only the first 7 characters of the value
# Default value for variable