Skip to content

Add explanation for grep -o option#1490

Closed
ggrimes wants to merge 1 commit intoswcarpentry:mainfrom
ggrimes:explain-grep-o-option
Closed

Add explanation for grep -o option#1490
ggrimes wants to merge 1 commit intoswcarpentry:mainfrom
ggrimes:explain-grep-o-option

Conversation

@ggrimes
Copy link

@ggrimes ggrimes commented Jun 3, 2025

The "Little Women" exercise in the finding things episode (07-find.md) used grep -o without explaining what it does or why it was used.

If this pull request addresses an open issue on the repository, please add 'Closes #NN' below, where NN is the issue number.

closes #1489

Please briefly summarise the changes made in the pull request, and the reason(s) for making these changes.

This commit adds a hint to the exercise solution, clarifying that grep -o prints each match on a new line, and explaining that this is why it's used with wc -l to count all occurrences of a pattern.

If any relevant discussions have taken place elsewhere, please provide links to these.

Details

For more guidance on how to contribute changes to a Carpentries project, please review the Contributing Guide and Code of Conduct.

Please keep in mind that lesson Maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org.

The "Little Women" exercise in the finding things episode (07-find.md)
used grep -o without explaining what it does or why it was used.

This commit adds a hint to the exercise solution, clarifying that
`grep -o` prints each match on a new line, and explaining that this
is why it's used with `wc -l` to count all occurrences of a pattern.
@github-actions
Copy link

github-actions bot commented Jun 3, 2025

🆗 Pre-flight checks passed 😃

This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits.

It should be safe to Approve and Run the workflows that need maintainer approval.

@ggrimes
Copy link
Author

ggrimes commented Jun 3, 2025

This commit was suggested by google jules, please feel free to disregard

@ggrimes ggrimes closed this Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grep -o used in solution for the Little Women exercise but never explained

1 participant