Skip to content

Glasgow | 25-SDC-NOV | Katarzyna Kazimierczuk | Sprint 2 | shell pipelines#323

Open
katarzynakaz wants to merge 1 commit intoCodeYourFuture:mainfrom
katarzynakaz:fix-pipelines-final
Open

Glasgow | 25-SDC-NOV | Katarzyna Kazimierczuk | Sprint 2 | shell pipelines#323
katarzynakaz wants to merge 1 commit intoCodeYourFuture:mainfrom
katarzynakaz:fix-pipelines-final

Conversation

@katarzynakaz
Copy link

@katarzynakaz katarzynakaz commented Feb 7, 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

Pipelines completed

@github-actions

This comment has been minimized.

@katarzynakaz katarzynakaz added 📅 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. labels Feb 7, 2026
@SlideGauge SlideGauge added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Feb 15, 2026
Copy link

@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.

Some files do not have trailingline ending, could you add it?

# The author got feedback that they're using too many exclamation marks (!).
#
# TODO: Write a command to output the contents of text.txt with every exclamation mark (!) replaced with a full-stop (.).
cat * text.txt | tr '!' '.' No newline at end of file

Choose a reason for hiding this comment

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

Do we need '*' with cat?

# 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).
cat * text.txt | tr 'Y' 'Z' | tr 'Z' 'Y' | tr 'y' 'z' | tr 'z' 'y' No newline at end of file

Choose a reason for hiding this comment

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

Do we need '*' with cat?

# 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).
cat * text.txt | tr 'Y' 'Z' | tr 'Z' 'Y' | tr 'y' 'z' | tr 'z' 'y' No newline at end of file

Choose a reason for hiding this comment

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

The current result makes several steps one by one: at first it converts Y -> Z, then it converts Z -> Y. Thus, instead of swapping, it effectively removes all Z from the file. Could modify tr in such a way it will simultaneously applied to the text.txt?

# 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 scores-table.txt -k3 -n -r | head -3 | tail -2 | head -1 No newline at end of file

Choose a reason for hiding this comment

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

head -3 takes 3 first lines, then grabs 2 from the tail then takes 1. We can have the same outcome by taking 2 first and then 1 from the tail

# 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.
grep -c 'Entry' events.txt | sort

Choose a reason for hiding this comment

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

Two issues: (1) Piping grep -c output to sort is pointless — grep -c outputs a single number, sorting one number does nothing. (2) The task says "It should be clear from your script's output" what the numbers mean, but the output is just 5 and 4 with no labels.

# 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: ${grep -c 'Entry' events-with-timestamps.txt}"

Choose a reason for hiding this comment

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

The commented-out lines (# echo "Entry: ${grep ...}") are debug leftovers showing the earlier wrong syntax. Could you remove them?

@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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Feb 15, 2026
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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants