LibraryCarpentry / lc-shell

Library Carpentry: The UNIX Shell
https://librarycarpentry.org/lc-shell/
Other
31 stars 85 forks source link

Feedback for Episode 6. Working with free text (sort -nr and carriage return) #183

Open bellaratmelia opened 2 years ago

bellaratmelia commented 2 years ago

I have two feedback/suggestions for Episode 6. working with free text:

First feedback:

I think it will be great to mention that the command sort -nr will reorder things in reverse order. At the moment, the explanation only said:

The fourth and final part sorts the text again by the counts of duplicates generated in step three.

So perhaps the following sentence can be added:

The -n part of the flag indicates that it's sorting numerically, and the r part of the flag means it's sorting in reverse (descending) order.

Second feedback:

I think it will be useful to put a brief explanation on what is a "carriage return", how it is different from newline, and why it needs to be removed from the text. I'm specifically referring to this text in the episode:

This uses the translate command and a special syntax to remove all punctuation ([:punct:]) and carriage returns (\r).

I don't know if it's just me but I have never heard about that term before this lesson. I tried searching around a little bit but I'm still not quite sure about why it needs to be removed from the text during cleaning.

Thank you!