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

LONDON SDC | Pooriya Ketabi | Module-Tools | Sprint-2 | Shell pipelines exercises #57

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

PooriyaKTB
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@PooriyaKTB PooriyaKTB added the Needs Review Participant to add when requesting review label Mar 31, 2025
Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I left a couple of comments :)

Comment on lines 7 to +8
# It should be clear from your script's output that there have been 5 Entry events and 4 Exit events.
sort events.txt | uniq -c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this quite answers the question - the prompt is that it should be clear that there are 5 Entry events and 4 Exit events, but the output of this is:

   2 Entry German
   1 Entry Mariana
   2 Entry Sally
   1 Exit German
   1 Exit Mariana
   2 Exit Sally

I can add those numbers up myself to get to 5 and 4, but ideally the script you produce would do that for me?

@@ -6,3 +6,7 @@ set -euo pipefail
# TODO: Write a command to show how many times anyone has entered and exited.
# It should be clear from your script's output that there have been 5 Entry events and 4 Exit events.
# The word "Event" should not appear in your script's output.
echo "Entry:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but isn't super general - imagine in the future a new event type got added, perhaps "Refused" - can you rewrite this so that it will work for any events that happen, not just Entry and Exit?

@illicitonion illicitonion added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants