Birmingham | 26-SDC-Mar | Chioma Okeke | Sprint 2 | Shell Pipelines#404
Birmingham | 26-SDC-Mar | Chioma Okeke | Sprint 2 | Shell Pipelines#404JanefrancessC wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
SlideGauge
left a comment
There was a problem hiding this comment.
Could you add trailing new lines to all the scripts? Check your settings of your editor, it should help
| # Basia London 22 9 6 | ||
| # Piotr Glasgow 15 2 25 11 8 | ||
| # Chandra Birmingham 12 6 | ||
| sort -k3 -n ./scores-table.txt | tail -r -n3 |
There was a problem hiding this comment.
tail -r is a macOS/BSD-only flag — it doesn't exist in GNU tail (Linux)
the option you commented out is more portable and works as well.
| # 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 -k3 -nr ./scores-table.txt No newline at end of file |
There was a problem hiding this comment.
what is the meaning of -k3 without additional argument and is that what we want here?
| # 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 -k3 -nr ./scores-table.txt | head -n2 | tail -n1 |
There was a problem hiding this comment.
what is the meaning of -k3 without additional argument and is that what we want here?
| # Basia London 22 9 6 | ||
| # Piotr Glasgow 15 2 25 11 8 | ||
| # Chandra Birmingham 12 6 | ||
| sort -k3 -n ./scores-table.txt | tail -r -n3 |
There was a problem hiding this comment.
what is the meaning of -k3 without additional argument and is that what we want here?
| # 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. | ||
| grep -o 'Entry\|Exit' ./events-with-timestamps.txt | sort | uniq -c No newline at end of file |
|
|
||
| # 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 '^[A-Z][^A-Z]*$' No newline at end of file |
There was a problem hiding this comment.
'^[A-Z][^A-Z]*$' is the precise regex for "no other uppercase characters" regardless of what else is in the filename. Like
|
Overall good job, could you address my notes please and I will accept the work? |
Learners, PR Template
Self checklist
Changelist
Completed the exercises
/shell-pipelines.