Skip to content

Conversation

@ike-agu
Copy link

@ike-agu ike-agu commented Nov 25, 2025

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

This Pr contains sprint 2 shell pipeline exercise.

  • Ls-grep exercise:

  • Listing all files containing at least one capital letters
  • Listing files starting with capital letters
  • List all 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.
  • Count the number of files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters.

sort-uniq-head-tail

  • Sort all the scores in the files
  • Use Sort and grep to print out files
  • Add script to count Entry and Exit events from the timestamped file.

tr

  • Use tr to replace exclamation marks with full stops in text.txt
  • Use tr to swap Y and Z (upper and lower case) in text.txt

@ike-agu ike-agu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 25, 2025
@ike-agu ike-agu added the 📅 Sprint 2 Assigned during Sprint 2 of this module label Nov 25, 2025
@DaryaShirokova DaryaShirokova added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Dec 26, 2025
Copy link

@DaryaShirokova DaryaShirokova left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few comments


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

Choose a reason for hiding this comment

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

I think you might have accidentally deleted the line here.

# Your output should be the number 7.

# ls sample-files | grep "^[A-Z][a-z]*$"
ls sample-files | grep -c "^[A-Z][a-z]*$"

Choose a reason for hiding this comment

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

While it is correct in this case, it is not exactly what the exercise asks - for example, it could have numbers / other characters (only uppercase letters need to be excluded)

# 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 -k2 -r scores-table.txt

Choose a reason for hiding this comment

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

The output seems to be:

Basia London 22 9 6
Ahmed London 1 10 4
Leila London 1
Piotr Glasgow 15 2 25 11 8
Mehmet Birmingham 3 12 17
Chandra Birmingham 12 6

Looks like they are not sorted by score?

@DaryaShirokova DaryaShirokova added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Dec 26, 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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants