diff options
author | alexandre medeiros <alexandre.medeiros@students.ic.unicamp.br> | 2013-09-22 01:06:35 -0300 |
---|---|---|
committer | alexandre medeiros <alexandre.medeiros@students.ic.unicamp.br> | 2013-09-22 01:20:31 -0300 |
commit | c14586e8c3c285b34c20358fa97e44aeed356dde (patch) | |
tree | 6fc739b54ef4af4214fad04a792f89fb4ef03211 /bash.html.markdown | |
parent | 7aa69ae3d7e616e1664c5f11d264d827e7bc5fce (diff) |
add conditional execution info to bash
Diffstat (limited to 'bash.html.markdown')
-rw-r--r-- | bash.html.markdown | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bash.html.markdown b/bash.html.markdown index 708131bd..41d0669e 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -4,6 +4,7 @@ tool: bash contributors: - ["Max Yankov", "https://github.com/golergka"] - ["Darren Lin", "https://github.com/CogBear"] + - ["Alexandre Medeiros", "http://alemedeiros.sdf.org"] filename: LearnBash.sh --- @@ -51,6 +52,10 @@ else echo "And this is not" fi +# There is also conditional execution +echo "Always executed" || echo "Only executed if first command fail" +echo "Always executed" && echo "Only executed if first command does NOT fail" + # Expressions are denoted with the following format: echo $(( 10 + 5 )) |