1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5
>Nested if/then Condition Tests</TITLE
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
11
TITLE="Advanced Bash-Scripting Guide"
12
HREF="index.html"><LINK
15
HREF="tests.html"><LINK
17
TITLE="Other Comparison Operators"
18
HREF="comparison-ops.html"><LINK
20
TITLE="Testing Your Knowledge of Tests"
21
HREF="testtest.html"><META
22
HTTP-EQUIV="Content-Style-Type"
23
CONTENT="text/css"><LINK
25
HREF="common/kde-common.css"
27
HTTP-EQUIV="Content-Type"
28
CONTENT="text/html; charset=iso-8859-1"><META
29
HTTP-EQUIV="Content-Language"
32
HREF="common/kde-localised.css"
34
TITLE="KDE-English"><LINK
36
HREF="common/kde-default.css"
38
TITLE="KDE-Default"></HEAD
46
STYLE="font-family: sans-serif;"
50
SUMMARY="Header navigation table"
59
>Advanced Bash-Scripting Guide: An in-depth exploration of the art of shell scripting</TH
67
HREF="comparison-ops.html"
102
> Condition Tests</H1
104
>Condition tests using the <TT
110
construct may be nested. The net result is equivalent to using the
112
HREF="operations.html#LOGOPS1"
118
comparison operator.</P
127
CLASS="PROGRAMLISTING"
130
3 if [ "$a" -gt 0 ]
132
5 if [ "$a" -lt 5 ]
134
7 echo "The value of \"a\" lies somewhere between 0 and 5."
138
11 # Same result as:
140
13 if [ "$a" -gt 0 ] && [ "$a" -lt 5 ]
142
15 echo "The value of \"a\" lies somewhere between 0 and 5."
150
HREF="bash2.html#CARDS"
152
> demonstrates a nested
165
SUMMARY="Footer navigation table"
176
HREF="comparison-ops.html"
204
>Other Comparison Operators</TD
218
>Testing Your Knowledge of Tests</TD
b'\\ No newline at end of file'