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 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.
Copy file name to clipboardExpand all lines: _episodes/05-counting-mining.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -301,7 +301,7 @@ programming languages.
301
301
> {: .solution}
302
302
{: .challenge}
303
303
304
-
> ## Count, sort and print (faded example)
304
+
> ## Count the number of words, sort and print (faded example)
305
305
>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:
306
306
>
307
307
>~~~
@@ -310,10 +310,11 @@ programming languages.
310
310
>{: .bash}
311
311
>
312
312
>
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).
314
315
>
315
316
>~~~
316
-
>__ -w *.tsv | sort __ | ____
317
+
>wc __ *.tsv | sort __ | ____
317
318
>~~~
318
319
>{: .bash}
319
320
>
@@ -374,9 +375,7 @@ programming languages.
374
375
375
376
> ## Counting the number of words
376
377
>
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.
380
379
>
381
380
> If you have time, you can also try to sort the results by piping it to `sort`.
0 commit comments