Skip to content

Commit

Permalink
Formulate more clearly
Browse files Browse the repository at this point in the history
The formulation "Next, we will assign a file name to the variable filename..." is misleading for two reasons:

1. The assignment to $filename happens before the first step inside the loop.
2. The assignment is not done by us, the users, but by the shell interpreter.
  • Loading branch information
cknuepfer authored Nov 9, 2023
1 parent 5bf3172 commit 2838242
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions episodes/05-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ In this example, the list is three filenames: `basilisk.dat`, `minotaur.dat`, an
Each time the loop iterates, we first use `echo` to print the value that the variable
`$filename` currently holds. This is not necessary for the result, but beneficial for us here to
have an easier time to follow along.
Next, we will assign a file name to the variable `filename`
and run the `head` command.
Next, we will run the `head` command on the file currently referred to by $filename.
The first time through the loop,
`$filename` is `basilisk.dat`.
The interpreter runs the command `head` on `basilisk.dat`
Expand Down

0 comments on commit 2838242

Please sign in to comment.