Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ep7 Tracking a species: exercise too difficult? #982

Open
gcapes opened this issue Jun 6, 2019 · 3 comments
Open

Ep7 Tracking a species: exercise too difficult? #982

gcapes opened this issue Jun 6, 2019 · 3 comments

Comments

@gcapes
Copy link
Contributor

@gcapes gcapes commented Jun 6, 2019

http://swcarpentry.github.io/shell-novice/07-find/index.html#tracking-a-species

This exercise doesn't really target the learning objectives of the episode. The main concepts tested in the exercise are pipes and filters, and interpreting the man pages to learn about options -- these are not learning objectives for episode 7. Also there is the requirement to implement script arguments from episode 6.

Given the man pages are required for both grep and cut, this exercise should have much more scaffolding. Perhaps splitting into steps would help to focus on the grep aspect, which is a learning objective for this episode.

@amanda-tan
Copy link

@amanda-tan amanda-tan commented Jun 6, 2019

The learning objectives for Episode 7 are grep and find. Could you be referring to Episode 4 which is Pipe and Filters?

I think referring to a previous episode can help refresh memory.

@gcapes
Copy link
Contributor Author

@gcapes gcapes commented Jun 7, 2019

I have now edited my comment to improve clarity -- hope that helps.

@shervinsahba
Copy link

@shervinsahba shervinsahba commented Jul 11, 2019

Agreed that the goal isn't clear, as far as a searching script goes. It's not obvious that we are searching the entire directory tree, and a potential hang up would be with cut -d : -f 2. The colon delimiter is difficult to interpret if you've yet to try a recursive grep.

Maybe clarify

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:

with instructions highlighting the goal of the search

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. That is, the script needs to recursively search through the directory for the given species, filter out filenames that contain the species, and then filter the desired columns from the datafile(s), redirecting the output to species.txt. For example using the data shown above, rabbit.txt would contain:

I still find this opaque, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants