summaryrefslogtreecommitdiffhomepage
path: root/bash.html.markdown
diff options
context:
space:
mode:
authoralexandre medeiros <alexandre.medeiros@students.ic.unicamp.br>2013-09-22 11:20:10 -0300
committeralexandre medeiros <alexandre.medeiros@students.ic.unicamp.br>2013-09-22 11:20:10 -0300
commite1c34ca138cc1a978a85ba5062bed47219ac2d1c (patch)
tree35a9a669fff9cf26c1704bb5f8c9228d23c96a2b /bash.html.markdown
parent96055ac7a513fef69fd4323df465537b8df835c4 (diff)
improve if on bash
Diffstat (limited to 'bash.html.markdown')
-rw-r--r--bash.html.markdown7
1 files changed, 4 insertions, 3 deletions
diff --git a/bash.html.markdown b/bash.html.markdown
index fe17e710..4a290358 100644
--- a/bash.html.markdown
+++ b/bash.html.markdown
@@ -59,11 +59,12 @@ read NAME # Note that we didn't need to declare new variable
echo Hello, $NAME!
# We have the usual if structure:
-if true
+# use 'man test' for more info about conditionals
+if [ $NAME -ne $USER ]
then
- echo "This is expected"
+ echo "Your name is you username"
else
- echo "And this is not"
+ echo "Your name isn't you username"
fi
# There is also conditional execution