Skip to content

Commit 99a2183

Browse files
author
Scott Peterson
authored
Update 05-counting-mining.md
In the faded example the -w flag is already introduced, but then we tell learners to use the man or --help commands a couple challenges later to find out about it. This doesn't really make sense considering we told them about it already, so I changed the faded example to include the -w flag and not the wc with the instructions to look up how to count words for that challenge. The later challenge I then rewrote just telling them to explore the -w flag more. You might want to get rid of one of the challenges or change them instead of fixing them how I have done it here.
1 parent 51b1009 commit 99a2183

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

_episodes/05-counting-mining.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ programming languages.
301301
> {: .solution}
302302
{: .challenge}
303303
304-
> ## Count, sort and print (faded example)
304+
> ## Count the number of words, sort and print (faded example)
305305
>To count the total lines in every `tsv` file, sort the results and then print the first line of the file we use the following:
306306
>
307307
>~~~
@@ -310,10 +310,11 @@ programming languages.
310310
>{: .bash}
311311
>
312312
>
313-
>Now let's change the scenario. We want to know the 10 files that contain _the most_ words. Fill in the blanks below to count the words for each file, put them into order, and then make an output of the 10 files with the most words (Hint: The sort command sorts in ascending order by default).
313+
>Now let's change the scenario. We want to know the 10 files that contain _the most_ words. Check the manual for the `wc` command (either using `man wc` or `wc --help`)
314+
> to see if you can find out what flag to use to print out the number of words (but not the number of lines and bytes). Fill in the blanks below to count the words for each file, put them into order, and then make an output of the 10 files with the most words (Hint: The sort command sorts in ascending order by default).
314315
>
315316
>~~~
316-
>__ -w *.tsv | sort __ | ____
317+
>wc __ *.tsv | sort __ | ____
317318
>~~~
318319
>{: .bash}
319320
>
@@ -374,9 +375,7 @@ programming languages.
374375
375376
> ## Counting the number of words
376377
>
377-
> Check the manual for the `wc` command (either using `man wc` or `wc --help`)
378-
> to see if you can find out what flag to use to print out the number of words
379-
> (but not the number of lines and bytes). Try it with the `.tsv` files.
378+
> We learned about the -w flag above, so now try using it with the `.tsv` files.
380379
>
381380
> If you have time, you can also try to sort the results by piping it to `sort`.
382381
> And/or explore the other flags of `wc`.

0 commit comments

Comments
 (0)