Skip to content

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

Open
PooriyaKTB wants to merge 13 commits intoCodeYourFuture:mainfrom
PooriyaKTB:Shell-pipelines
Open

LONDON SDC | Pooriya Ketabi | Module-Tools | Sprint-2 | Shell pipelines exercises#57
PooriyaKTB wants to merge 13 commits intoCodeYourFuture:mainfrom
PooriyaKTB:Shell-pipelines

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 Trainee to add when requesting review. PRs without this label will not be reviewed. 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 No newline at end of file
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?

# 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 with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 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 with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants