Skip to content

London | 26-March-SDC | Ammad Ur Rehman | Sprint 2 | Shell Pipelines Exercises#479

Open
anosidium wants to merge 13 commits into
CodeYourFuture:mainfrom
anosidium:shell-pipelines
Open

London | 26-March-SDC | Ammad Ur Rehman | Sprint 2 | Shell Pipelines Exercises#479
anosidium wants to merge 13 commits into
CodeYourFuture:mainfrom
anosidium:shell-pipelines

Conversation

@anosidium
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 all the exercises.

@anosidium anosidium added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 8, 2026
# 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 -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.

The values on the 2nd column are not scores.

#
# 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
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 safer practice is to enclose the character set (even if it contains only one letter) by a pair of quotes.

This is because some symbols have special meaning in the command line arguments.

# 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 -oE 'Entry|Exit' events.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.

Note: An alternative to using grep is to extract the first field on each line using awk.

@cjyuan cjyuan 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 12, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants