add conditional execution info to bash

This commit is contained in:
alexandre medeiros 2013-09-22 01:06:35 -03:00
parent 7aa69ae3d7
commit c14586e8c3

View File

@ -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 ))