From c14586e8c3c285b34c20358fa97e44aeed356dde Mon Sep 17 00:00:00 2001 From: alexandre medeiros Date: Sun, 22 Sep 2013 01:06:35 -0300 Subject: add conditional execution info to bash --- bash.html.markdown | 5 +++++ 1 file changed, 5 insertions(+) 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 )) -- cgit v1.2.3