London | 26-March-SDC | Ammad Ur Rehman | Sprint 2 | Shell Pipelines Exercises#479
Open
anosidium wants to merge 13 commits into
Open
London | 26-March-SDC | Ammad Ur Rehman | Sprint 2 | Shell Pipelines Exercises#479anosidium wants to merge 13 commits into
anosidium wants to merge 13 commits into
Conversation
cjyuan
reviewed
May 12, 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Note: An alternative to using grep is to extract the first field on each line using awk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Completed all the exercises.