Skip to content

Commit 92a0a00

Browse files
authored
Merge pull request #164 from scottcpeterson/patch-17
Update 05-counting-mining.md
2 parents b8d45d8 + 99a2183 commit 92a0a00

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)