Skip to content

London| 2026-MAR-SDC | Imran Mohamed | Sprint 2 | Shell pipelines#384

Open
i786m wants to merge 3 commits intoCodeYourFuture:mainfrom
i786m:shell-pipelines
Open

London| 2026-MAR-SDC | Imran Mohamed | Sprint 2 | Shell pipelines#384
i786m wants to merge 3 commits intoCodeYourFuture:mainfrom
i786m:shell-pipelines

Conversation

@i786m
Copy link
Copy Markdown

@i786m i786m commented Mar 16, 2026

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Added commands for shell pipelines exercises

@i786m i786m added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 16, 2026
Copy link
Copy Markdown

@SlideGauge SlideGauge left a comment

Choose a reason for hiding this comment

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

Could you check trailing new line presence in the files? Some files does not have it, github highlights it with

Image

# The input for this script is the events.txt file.
# 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.
sort events.txt | uniq -c No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This command groups by the full line, so the output is per-person counts: 2 Entry German, 1 Entry Mariana, 2 Entry Sally, etc. The task says "it should be clear from your script's output that there have been 5 Entry events and 4 Exit events" - a reader has to sum the numbers mentally to get there. You need to count by event type only.

# 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.
sort events-with-timestamps.txt | uniq -c | grep -v "Event"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Because every timestamp+person combination in events-with-timestamps.txt is unique, sort | uniq -c just outputs every line with a count of 1 - it doesn't aggregate Entry vs Exit.

@SlideGauge SlideGauge 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 May 2, 2026
@SlideGauge
Copy link
Copy Markdown

Could you address my comments please?

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