Glasgow | 26-SDC-Mar | Mohammed Abdoon | Sprint 1 | Individual Shell Tools#336
Glasgow | 26-SDC-Mar | Mohammed Abdoon | Sprint 1 | Individual Shell Tools#336M-Abdoon wants to merge 13 commits intoCodeYourFuture:mainfrom
Conversation
SlideGauge
left a comment
There was a problem hiding this comment.
Could you also check new line in the end of each script please?
|
|
||
| # TODO: Write a command to output every line in dialogue.txt said by the Doctor. | ||
| # The output should contain 6 lines. | ||
| grep "" dialogue.txt No newline at end of file |
There was a problem hiding this comment.
Will this command produce lines said only by doctor? Hint: doctor lines start from "Doctor:"
There was a problem hiding this comment.
No, I should have specified the lines that start with the word Doctor. I updated it.
|
|
||
| # TODO: Write a command to output, for each `.txt` file in this directory, how many lines of dialogue the Doctor has. | ||
| # The output should show that dialogue.txt contains 6 lines, dialogue-2.txt contains 2, and dialogue-3.txt contains 0. | ||
| grep -c "^doctor:" *.txt No newline at end of file |
There was a problem hiding this comment.
Do doctor lines start from "doctor:"?
There was a problem hiding this comment.
They actually start with Doctor not doctor. updated it.
|
|
||
| # TODO: Write a command to output every line in dialogue.txt that contains the string "cure", as well as the line before that line. | ||
| # The output should contain two pairs of two lines of text (with a separator between them). | ||
| grep -B1 "cure" dialogue*.txt |
There was a problem hiding this comment.
Does the task request to process all dialogue files?
There was a problem hiding this comment.
No, only the dialogue file. I deleted the * from the filename.
|
|
||
| # 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 |
Changes made to the files. Thanks. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This reverts commit c104cd4.
…/M-Abdoon/SDC-Module-Tools into individual-shell-tools-exercises
Learners, PR Template
Self checklist
Changelist
Exercises soveld.
Questions
No questions, thank you.