Skip to content

Birmingham | 26-SDC-Mar | Chioma Okeke | Sprint 2 | Shell Pipelines#404

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

Birmingham | 26-SDC-Mar | Chioma Okeke | Sprint 2 | Shell Pipelines#404
JanefrancessC wants to merge 3 commits intoCodeYourFuture:mainfrom
JanefrancessC:shell-pipelines

Conversation

@JanefrancessC
Copy link
Copy Markdown

Learners, PR Template

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

Completed the exercises /shell-pipelines.

@JanefrancessC JanefrancessC added 🦑 Size Large 4-8 hours 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Tools The name of the module. labels Mar 20, 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 add trailing new lines to all the scripts? Check your settings of your editor, it should help

# Basia London 22 9 6
# Piotr Glasgow 15 2 25 11 8
# Chandra Birmingham 12 6
sort -k3 -n ./scores-table.txt | tail -r -n3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tail -r is a macOS/BSD-only flag — it doesn't exist in GNU tail (Linux)
the option you commented out is more portable and works as well.

# The input for this script is the scores-table.txt file.
# TODO: Write a command to output scores-table.txt, with lines sorted by the person's first score, descending.
# The first line of your output should be "Basia London 22 9 6" (with no quotes).
sort -k3 -nr ./scores-table.txt 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.

what is the meaning of -k3 without additional argument and is that what we want here?

# The input for this script is the scores-table.txt file.
# TODO: Write a command to output scores-table.txt, with shows the line for the player whose first score was the second highest.
# Your output should be: "Piotr Glasgow 15 2 25 11 8" (without quotes).
sort -k3 -nr ./scores-table.txt | head -n2 | tail -n1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what is the meaning of -k3 without additional argument and is that what we want here?

# Basia London 22 9 6
# Piotr Glasgow 15 2 25 11 8
# Chandra Birmingham 12 6
sort -k3 -n ./scores-table.txt | tail -r -n3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what is the meaning of -k3 without additional argument and is that what we want here?

# 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.
grep -o 'Entry\|Exit' ./events-with-timestamps.txt | sort | 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.

Nice use of grep


# TODO: Write a command to output the names of the files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters.
# Your output should contain 7 files.
ls ./sample-files/ | grep '^[A-Z][^A-Z]*$' 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.

'^[A-Z][^A-Z]*$' is the precise regex for "no other uppercase characters" regardless of what else is in the filename. Like

@SlideGauge
Copy link
Copy Markdown

Overall good job, could you address my notes please and I will accept the work?

@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 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Tools The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 🦑 Size Large 4-8 hours 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants