London |SDC- MARC-2026 | JAMAL LAQDIEM | Sprint 1 | Individual Shell Tolls#335
Open
jamallaqdiem wants to merge 16 commits intoCodeYourFuture:mainfrom
Open
London |SDC- MARC-2026 | JAMAL LAQDIEM | Sprint 1 | Individual Shell Tolls#335jamallaqdiem wants to merge 16 commits intoCodeYourFuture:mainfrom
jamallaqdiem wants to merge 16 commits intoCodeYourFuture:mainfrom
Conversation
Added -1 that allow on file by line.
…tart of the line.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9 similar comments
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 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 comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
SlideGauge
reviewed
Mar 21, 2026
|
|
||
| # TODO: Write a command to output the contents of the helper-1.txt file inside the helper-files directory to the terminal. | ||
| # The output of this command should be "Once upon a time...". | ||
| cat helper-files/helper-1.txt No newline at end of file |
There was a problem hiding this comment.
what will happen if we execute this script from the cat folder? (hint, check where's helper-files folder is located relative to cat folder)
|
|
||
| # TODO: Write a command to output every line in dialogue.txt that does not contain the word "Hello" (regardless of case). | ||
| # The output should contain 10 lines. | ||
| grep -vi "hello" dialogue.txt | wc -l No newline at end of file |
There was a problem hiding this comment.
Could you double check what this script outputs? The request is to output lines of dialogue satisfying some criteria
| # TODO: Write a command to output just the names of each player along with the total of adding all of that player's scores. | ||
| # Your output should contain 6 lines, each with one word and one number on it. | ||
| # The first line should be "Ahmed 15". The second line should be "Basia 37" | ||
| awk '{ total = 0; for (i = 2; i <= NF; i++) total += $i; print $1, total }' scores-table.txt No newline at end of file |
There was a problem hiding this comment.
do we indeed want to start summation from 2 item?
|
|
||
| # 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.
What will happen if patient says a line with a word "Doctor"?
| # 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. | ||
| # The output should be a list of names in this order, one per line: helper-3.txt, helper-1.txt, helper-2.txt. | ||
|
|
||
| ls -1t -1 ./child-directory |
|
Good direction, I placed some comments, please fix them. Also, could you doublecheck new lines in the end of scripts please? |
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.
Self checklist
Changelist
Completed all exercises about command lines.