London | 26-SDC-Mar | Khilola Rustamova| Sprint 1 | Individual shell tools#358
London | 26-SDC-Mar | Khilola Rustamova| Sprint 1 | Individual shell tools#358HilolaRustam wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
| # NOTE: This is a stretch exercise - it is optional. | ||
|
|
||
| # TODO: Write a command to output just the names of each player along with the total of adding all of that player's scores. | ||
| awk '{sum=o; for(i=3; i<=NF; i++) sum+=$i; print $1, sum}' scores-table.txt |
There was a problem hiding this comment.
Could you have a look at how we initialise sum variable? Is it what we really want?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output the name of every `.txt` file in this directory which contains a line of dialogue said by the Doctor. | ||
| grep -l "^Doctor" *.txt |
There was a problem hiding this comment.
if our file contained a line like "Doctors:" what will happen? Should we make more precise mask?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output, for each `.txt` file in this directory, how many lines of dialogue the Doctor has. | ||
| grep -c "^Doctor" *.txt |
There was a problem hiding this comment.
Same here: if our file contained a line like "Doctors:" what will happen? Should we make more precise mask?
There was a problem hiding this comment.
yes with "^Doctor:" as well
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output the contents of the file `helper-3.txt` inside the helper-files directory to the terminal. | ||
| cat ../helper-files/helper-3.txt | nl |
There was a problem hiding this comment.
Can we use some cat command line parameters to get the same output?
| # NOTE: This is a stretch exercise - it is optional. | ||
|
|
||
| # TODO: Write a command to output the contents of all of the files in the helper-files directory to the terminal. | ||
| cat ../helper-files/* | nl |
There was a problem hiding this comment.
Can we use some cat command line parameters to get the same output?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output just the names of each player in London along with the score from their last attempt. | ||
| awk '$2 == "London" {print $1, $NF}' scores-table.txt |
|
Good job, I've got a couple of notes to address, fix them please and I'll complete the review. |
This comment has been minimized.
This comment has been minimized.
|
Good job in addressing my comments, thanks. |
3e00411 to
58e3f27
Compare
|
Review complete |
Learners, PR Template
Self checklist
Changelist
Individual shell tools exercise is completed
Questions