You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to remind learners about the idea of shell variables (which are introduced in 05-loops) and reinforce good practice, legibility, helping future users, etc., I'd like to suggest that we add another example after introducing comments. Specifically, it could look like:
$ nano middle.sh
# Select lines from the middle of a file.
# Usage: bash middle.sh filename end_line num_lines
head -n "$end_line" "$filename" | tail -n "$num_lines"
Since variables are already come up in the previous lesson, I expect that the added time should be quite minimal whereas the payoff is quite important since some learners might forget that they can define their own variables or, worse, think that they are constrained to use the default special variables.
The downside is that many instructors are already pressed for time at this stage without new/additional material. Therefore, ways to cut back that don't strike me personally as too large a sacrifice could include:
Removing the "Why Isn't It Doing Anything?" section. I find that this is often quite confusing for learners and in my experience isn't that common an error when starting to write one's own scripts.
Moving the "Why Isn't It Doing Anything?" section to be a new challenge along the lines of the "Debugging Scripts" challenge that already exists.
The text was updated successfully, but these errors were encountered: