Skip to content

Commit 0f13965

Browse files
authored
Fixes for inconsistencies in Crowdin. Also slight wording changes for the conditional tests to make them consistent. (#1262)
1 parent 6866852 commit 0f13965

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

docs/books/learning_bash/07-loops.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,21 @@ Whatever the loop used, the commands to be repeated are placed **between the wor
3939

4040
The `while` / `do` / `done` structure evaluates the command placed after `while`.
4141

42-
If this command is true (`$? = 0`), the commands placed between `do` and `done` are executed. The script then returns to the beginning to evaluate the command again.
42+
When the evaluated command is true:
4343

44-
When the evaluated command is false (`$? != 0`), the shell resumes the execution of the script at the first command after done.
44+
```
45+
$? = 0
46+
```
47+
48+
the commands placed between `do` and `done` are executed. The script then returns to the beginning to evaluate the command again.
49+
50+
When the evaluated command is false:
51+
52+
```
53+
$? != 0
54+
```
55+
56+
the shell resumes the execution of the script at the first command after done.
4557

4658
Syntax of the conditional loop structure `while`:
4759

@@ -140,7 +152,13 @@ done
140152

141153
The `until` / `do` / `done` structure evaluates the command placed after `until`.
142154

143-
If this command is false (`$? != 0`), the commands placed between `do` and `done` are executed. The script then returns to the beginning to evaluate the command again.
155+
When the evaluated command is false:
156+
157+
```
158+
$? != 0
159+
```
160+
161+
the commands placed between `do` and `done` are executed. The script then returns to the beginning to evaluate the command again.
144162

145163
When the evaluated command is true (`$? = 0`), the shell resumes the execution of the script at the first command after `done`.
146164

0 commit comments

Comments
 (0)