-
-
Notifications
You must be signed in to change notification settings - Fork 42
London | SDC-Nov-25| Ikenna Agulobi | sprint 2 | Shell pipelines #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
DaryaShirokova
left a comment
There was a problem hiding this 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. | ||
|
|
There was a problem hiding this comment.
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]*$" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
Learners, PR Template
Self checklist
Changelist
This Pr contains sprint 2 shell pipeline exercise.
Ls-grep exercise:
sort-uniq-head-tail
tr