You are on page 1of 6

Troubleshooting Scripts

Nigel Poulton
http://nigelpoulton.com
@nigelpoulton
Module Outline
The echo Command Exit Codes
xtrace Wrap-Up
if [ $var ge 5 ]
<code>
<code>
<code>
fi
echo Inside if statement
Exit Status = 0 Success
Error Exit Status != 0
<code>
<code>
<code>
if [ $var ge 5 ] ; then
echo Inside if statement
<code>
<code>
elif
echo Inside elif statement
<code>
<code>
fi
<code>
<code>
<code>
<code>
<code>
<code>
while [ $value le 100 ] ; do
echo Value of $value
<code>
<code>
<code>
done
<code>
<code>
What We Covered
The echo Command Exit Status xtrace
Commands
Variables
Positional
Parameters
User Input
Conditionals
Loops
Functions
Scheduling

You might also like