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 | DONARA BLANC | MODULE TOOLS | SPRINT 2| SHELL PIPELINES #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

donarbl
Copy link

@donarbl donarbl commented Mar 11, 2025

Self checklist

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

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@donarbl donarbl added Needs Review Participant to add when requesting review 📅 Sprint 2 Assigned during Sprint 2 of this module labels Mar 11, 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 few comments - also the general shell script comments from #44 apply here too :)

@@ -4,3 +4,11 @@ set -euo pipefail

# 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 -E '^[A-Z][^A-Z]*$'
Copy link
Member

Choose a reason for hiding this comment

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

What does the -E do here? Why do you need it here when you didn't need it for script-02 which otherwise looks quite similar?

@@ -5,3 +5,11 @@ set -euo pipefail
# 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 -nrk3 scores-table.txt
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 personally I tend to separate out flags which take values to make it more clear which values are associated with which flag, i.e. I would probably write sort -nr -k3 scores-table.txt or sort -n -r -k3 scores-table.txt just to make it a little more clear the 3 is attached to the -k :)

@@ -6,3 +6,4 @@ 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.
tail -9 events-with-timestamps.txt | sort -k3 | awk '{print $3}' | 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.

This works, but I probably would've started it with head -n+2 rather than tail -9 - can you think about why that is? What's the difference between the two?

@@ -7,3 +7,14 @@ set -euo pipefail
# so every Y should be a Z, and every Z should be a Y!
#
# TODO: Write a command to output the contents of text.txt with every Y and Z swapped (both upper and lower case).
Dear Zara,
Copy link
Member

Choose a reason for hiding this comment

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

I think the command is missing here? Can you add it?

@illicitonion illicitonion added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Mar 18, 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 📅 Sprint 2 Assigned during Sprint 2 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants