From 9d3462953604d0d331191bb1fca82295e1ece6ed Mon Sep 17 00:00:00 2001 From: Etan Reisner Date: Sun, 26 Apr 2015 13:22:48 -0400 Subject: Add myself as a contributor. --- bash.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/bash.html.markdown b/bash.html.markdown index 35bed9a2..b9cd53ff 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -10,6 +10,7 @@ contributors: - ["Anton Strömkvist", "http://lutic.org/"] - ["Rahil Momin", "https://github.com/iamrahil"] - ["Gregrory Kielian", "https://github.com/gskielian"] + - ["Etan Reisner", "https://github.com/deryni"] filename: LearnBash.sh --- -- cgit v1.2.3 From e2ca2c9550474ca3dad0f7ef8735e614da081258 Mon Sep 17 00:00:00 2001 From: Etan Reisner Date: Sun, 26 Apr 2015 13:32:41 -0400 Subject: Add another very common shell variable assignment mistake. --- bash.html.markdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bash.html.markdown b/bash.html.markdown index b9cd53ff..77ee37f6 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -37,7 +37,14 @@ VARIABLE="Some string" # But not like this: VARIABLE = "Some string" # Bash will decide that VARIABLE is a command it must execute and give an error -# because it couldn't be found. +# because it can't be found. + +# Or like this: +Variable= 'Some string' +# Bash will decide that 'Some string' is a command it must execute and give an +# error because it can't be found. (In this case the 'Variable=' part is seen +# as a variable assignment valid only for the scope of the 'Some string' +# command.) # Using the variable: echo $VARIABLE -- cgit v1.2.3 From aa11cc659de990a6c4d4104bcc733f373b079ae7 Mon Sep 17 00:00:00 2001 From: Etan Reisner Date: Mon, 27 Apr 2015 07:30:17 -0400 Subject: Follow variable capitalization on this branch. --- bash.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash.html.markdown b/bash.html.markdown index 77ee37f6..e0c12f97 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -40,9 +40,9 @@ VARIABLE = "Some string" # because it can't be found. # Or like this: -Variable= 'Some string' +VARIABLE= 'Some string' # Bash will decide that 'Some string' is a command it must execute and give an -# error because it can't be found. (In this case the 'Variable=' part is seen +# error because it can't be found. (In this case the 'VARIABLE=' part is seen # as a variable assignment valid only for the scope of the 'Some string' # command.) -- cgit v1.2.3