Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Correction and Suggested Edits for Pipes & Filters episode #1211

Open
omcgrath2009 opened this issue Jul 4, 2021 · 1 comment
Open

A Correction and Suggested Edits for Pipes & Filters episode #1211

omcgrath2009 opened this issue Jul 4, 2021 · 1 comment
Assignees
Labels
type:clarification Suggest change to make lesson clearer

Comments

@omcgrath2009
Copy link

  1. In the “Nelle’s Pipeline: Checking Files” section at the end of the lesson, there is a minor error in the discussion of the files seen in the output involving the tail command at the end of the piped sequence:

$ wc -l *.txt | sort -n | tail -n 5

The output of this command consists of the following five lines:
300 NENE02040B.txt
300 NENE02040Z.txt
300 NENE02043A.txt
300 NENE02043B.txt
5040 total

The lesson then asks the question:

Those numbers look good — but what’s that ‘Z’ doing there in the third-to-last line? All of her samples should be marked ‘A’ or ‘B’; by convention, her lab uses ‘Z’ to indicate samples with missing information. To find others like it, she does this:

However, the filename containing the ‘Z’ is actually on the fourth-to-last-line. This discrepancy points to another potentially confusing issue. Unlike the output of ‘head -n 5’ used prior to this example, the output of ‘tail -n 5’ only yields four actual filenames. At issue here is the summary output of the wc command, which is rightly treated by tail as a line. It might be worth pointing out this effect in the lesson (?).

  1. A minor suggestion about word choice: This “Pipes and Filters” lesson begins with the sentence:

Now that we know a few basic commands, we can finally look at the shell’s most powerful feature: the ease with which it lets us combine existing programs in new ways.

Perhaps consider some suggested edits as highlighted below:

Now that we have seen a few basic commands, we can finally look at the shell’s most powerful feature: the ease with which it lets us combine the output and input of existing commands and programs in helpful ways.

@gcapes
Copy link
Contributor

gcapes commented Jul 27, 2021

Thanks for the issues.

  1. this would be good to fix.
  2. I think sometimes clarity of wording beats absolute correctness. The existing sentence is easy to read whereas the suggestion is less so.

@gcapes gcapes added the type:clarification Suggest change to make lesson clearer label Jul 27, 2021
@gcapes gcapes self-assigned this Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:clarification Suggest change to make lesson clearer
Projects
None yet
Development

No branches or pull requests

2 participants