-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgroup2.html
220 lines (81 loc) · 4.02 KB
/
group2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Loops in Shell Script</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="logo">
<h1>ITC134 FL16 LINUX Shell Resource</h1>
</div>
<hr />
<header>
<div id="menu">
<ul>
<li class="inactive"><a href="index.html">Home</a></li>
<li class="inactive"><a href="group1.html">Group 1</a></li>
<li class="current_page_item"><a href="group2.html">Group 2</a></li>
<li class="inactive"><a href="group3.html">Group 3</a></li>
<li class="inactive"><a href="group4.html">Group 4</a></li>
<li class="inactive"><a href="group5.html">Group 5</a></li>
</ul>
</div>
</header>
<div id="page">
<div id="content">
<div class="post">
<h2 class="title"><a href="#">Group 2: Loops in Shell Script</a></h2>
<div class="entry">
<p>Body of a Loop - The single statement or a block of statements that can be repeated (a loop may not execute at all if the condition is false to start with). In Java the body of the loop is either the first statement following a while or for loop is the body of the loop or a block of statements enclosed in { and }.</p>
<p>For Loop - A loop that has a header with 3 optional parts: initialization, condition, and change. It does the initialization one time before the body of the loop executes, executes the body of the loop if the condition is true, and executes the change after the body of the loop executes before checking the condition again.
</p>
<p>For Each Loop - Used to loop through all the elements of a collection (like a list or an array) and each time through the loop set a variable to the next item from the collectionInfinite Loop - A loop that never ends.
</p>
<p>Loop - A way to repeat one or more statements in a program.Nested Loop - One loop inside of another.Out of Bounds error - A run-time error that occurs when you try to access past the end of a string or list in a loop.Trace Code - Writing down the values of the variables and how they change each time the body of the loop executes.While Loop - A loop that repeats while a Boolean expression is true.
</p>
[12:53]
that's a concise summary of loops atleast from python stand point!</p>
</div>
</div>
<div class="post">
<h2 class="title"><a href="#">Loop Code Snippets</a></h2>
<p class="meta">
<pre>
#! /bin/bashfor
(( i = 0 ; i <= 9; i++ ))
doecho "This is file $i" > $i.
done
</pre>
</p>
<div class="entry">
</div>
</div>
</div>
<div id="sidebar">
<h2>Resource Links: </h2>
<ul>
<li><a href="group1.html">Group1</a></li>
<li><a href="group2.html">Group2</a></li>
<li><a href="group3.html">Group3</a></li>
<li><a href="group4.html">Group4</a></li>
<li><a href="group5.html">Group5</a></li>
</ul>
</div>
<div style="clear: both;"> </div>
</div>
<footer>
<footer>
<small>
© 2016, All Rights Reserved
<br />
<a href="http://validator.w3.org/check/referer" target="_blank">Valid HTML</a>
<br />
<a href="http://jigsaw.w3.org/css-validator/check?uri=referer" target="_blank">Valid CSS</a>
</small>
</footer>
</footer>
</body>
</html>