London | 26-March-SDC | Ammad Ur Rehman | Sprint 1 | Individual Shell Tools#420
London | 26-March-SDC | Ammad Ur Rehman | Sprint 1 | Individual Shell Tools#420anosidium wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
SlideGauge
left a comment
There was a problem hiding this comment.
Could you adjust the settings of your editor and adjust all the scripts, they are missing the trailing new line
| # Your output should contain 3 lines, each with one word and one number on it. | ||
| # The first line should be "Ahmed 4". | ||
|
|
||
| awk '{print $1, $5}' scores-table.txt No newline at end of file |
There was a problem hiding this comment.
- Will it output London-only players?
- Do all the players have 5 columns?
| # TODO: Write a command to output every line in dialogue.txt said by the Doctor. | ||
| # The output should contain 6 lines. | ||
|
|
||
| grep '^Doctor' dialogue.txt No newline at end of file |
There was a problem hiding this comment.
What will happen if have a dialogue line from a character like this:
DoctorlikeButNotADoctor: la la la
| # 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. | ||
| # The output should contain two filenames. | ||
|
|
||
| grep -l 'Doctor' *.txt No newline at end of file |
There was a problem hiding this comment.
Will this pattern ignore something like this:
Patient: Doctor, what should I do?
| # Line 3 should be "It contains many lines, and there are some things you may want to do with each of them.". | ||
| # Line 11 should be "We also should remember, when we go shopping, to get 4 items: oranges, cheese, bread, olives.". | ||
|
|
||
| sed -E 's/,([^ ])/\, \1/g' input.txt No newline at end of file |
There was a problem hiding this comment.
Do we need to escape comma via ","?
| @@ -16,8 +16,12 @@ echo "First exercise (sorted newest to oldest):" | |||
| # TODO: Write a command which lists the files in the child-directory directory, one per line, sorted so that the most recently modified file is first. | |||
There was a problem hiding this comment.
Does the approach output one-per-line in this script?
| # I was tempted to take a bite of it. | ||
| # But this seemed like a bad idea... | ||
|
|
||
| cat ../helper-files/helper-1.txt ../helper-files/helper-2.txt ../helper-files/helper-3.txt No newline at end of file |
There was a problem hiding this comment.
Do we need to list all the files manually if the task asks tou output all the files inside the directory?
Learners, PR Template
Self checklist
Changelist
Done all the required exercise with some stretch exercises completed
Questions
I find reading the manual pages of the commands confusing and looking them up on the internet isn’t much better either.