summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-08-31 23:09:25 -0700
committerAdam Bard <github@adambard.com>2013-08-31 23:09:25 -0700
commit63c62eff87064c3d76055d98393032fbd66436db (patch)
tree0b6a110e13057218201dd810b6f57c1a907219e1
parent9e30906bf9e42df23f2b596490fc82a040e2f67b (diff)
parente2cd18ba463279a650c2393f68f37131a52b4c4d (diff)
Merge pull request #290 from avjinder/patch-1
The case statement in Bash is incorrect
-rw-r--r--bash.html.markdown9
1 files changed, 4 insertions, 5 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index a0c43c12..76c794c6 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -73,12 +73,11 @@ ls -l | grep "\.txt"
echo "There are $(ls | wc -l) items here."
# Bash uses a case statement that works similarily to switch in Java and C++:
-case "$VARIABLE"
-in
+case "$VARIABLE" in
#List patterns for the conditions you want to meet
- 0) echo "There is a zero."
- 1) echo "There is a one."
- *) echo "It is not null."
+ 0) echo "There is a zero.";;
+ 1) echo "There is a one.";;
+ *) echo "It is not null.";;
esac
#For loops iterate for as many arguments given: