Skip to content

Commit

Permalink
Add note about case sensitivity for Little Women challenge (#984)
Browse files Browse the repository at this point in the history
Fix #932.
  • Loading branch information
gcapes authored and gdevenyi committed Jun 19, 2019
1 parent 102ee3d commit 6c0a944
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions _episodes/07-find.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ keypoints:
- "`$(command)` inserts a command's output in place."
---

In the same way that many of us now use "Google" as a
verb meaning "to find", Unix programmers often use the
In the same way that many of us now use "Google" as a
verb meaning "to find", Unix programmers often use the
word "grep".
"grep" is a contraction of "global/regular expression/print",
a common sequence of operations in early Unix text editors.
Expand Down Expand Up @@ -114,7 +114,7 @@ The Tao that is seen
{: .output}

Note that a "word boundary" includes the start and end of a line, so not
just letters surrounded by spaces.
just letters surrounded by spaces.
Sometimes we don't
want to search for a single word, but a phrase. This is also easy to do with
`grep` by putting the phrase in quotes.
Expand Down Expand Up @@ -282,10 +282,10 @@ Miscellaneous:
{: .callout}
> ## Tracking a Species
>
> Leah has several hundred
>
> Leah has several hundred
> data files saved in one directory, each of which is formatted like this:
>
>
> ~~~
> 2013-11-05,deer,5
> 2013-11-05,rabbit,22
Expand All @@ -295,27 +295,27 @@ Miscellaneous:
> ~~~
> {: .source}
>
> She wants to write a shell script that takes a species as the first command-line argument
> and a directory as the second argument. The script should return one file called `species.txt`
> She wants to write a shell script that takes a species as the first command-line argument
> and a directory as the second argument. The script should return one file called `species.txt`
> containing a list of dates and the number of that species seen on each date.
> For example using the data shown above, `rabbit.txt` would contain:
>
>
> ~~~
> 2013-11-05,22
> 2013-11-06,19
> ~~~
> {: .source}
>
> Put these commands and pipes in the right order to achieve this:
>
>
> ~~~
> cut -d : -f 2
> >
> |
> grep -w $1 -r $2
> |
> $1.txt
> cut -d , -f 1,3
> cut -d : -f 2
> >
> |
> grep -w $1 -r $2
> |
> $1.txt
> cut -d , -f 1,3
> ~~~
> {: .language-bash}
>
Expand Down Expand Up @@ -381,6 +381,11 @@ Miscellaneous:
> > This solution is inferior because `grep -c` only reports the number of lines matched.
> > The total number of matches reported by this method will be lower if there is more
> > than one match per line.
> >
> > Perceptive observers may have noticed that character names sometimes appear in all-uppercase
> > in chapter titles (e.g. "MEG GOES TO VANITY FAIR").
> > If you wanted to count these as well, you could add the `-i` option for case-insensitivity
> > (though in this case, it doesn't affect the answer to which sister is mentioned most frequently).
> {: .solution}
{: .challenge}
Expand Down Expand Up @@ -429,7 +434,7 @@ which is where we want our search to start.
`find`'s output is the names of every file **and** directory
under the current working directory.
This can seem useless at first but `find` has many options
to filter the output and in this lesson we will discover some
to filter the output and in this lesson we will discover some
of them.
The first option in our list is
Expand Down Expand Up @@ -656,7 +661,7 @@ about them."
{: .challenge}
> ## Finding Files With Different Properties
>
>
> The `find` command can be given several other criteria known as "tests"
> to locate files with specific attributes, such as creation time, size,
> permissions, or ownership. Use `man find` to explore these, and then
Expand Down

0 comments on commit 6c0a944

Please sign in to comment.