Glasgow | 26-SDC-Mar | Mohammed Abdoon | Sprint 1 | Individual Shell Tools#336
Open
M-Abdoon wants to merge 6 commits intoCodeYourFuture:mainfrom
Open
Glasgow | 26-SDC-Mar | Mohammed Abdoon | Sprint 1 | Individual Shell Tools#336M-Abdoon wants to merge 6 commits intoCodeYourFuture:mainfrom
M-Abdoon wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
SlideGauge
reviewed
Mar 21, 2026
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:"
|
|
||
| # 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:"?
|
|
||
| # 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?
|
|
||
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Exercises soveld.
Questions
No questions, thank you.