-
-
Notifications
You must be signed in to change notification settings - Fork 42
Cape Town| 25-SDC-July | Faith Muzondo | Sprint 1 | Individual Shells tools #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1fa1221
12281ed
1e30a33
7176041
f31ca13
2d963e8
6d381a0
41983e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,5 @@ set -euo pipefail | |
|
|
||
| # 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...". | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sh file could work if it were run in the helper-files directory. However if I run it from here (the cat folder) it doesn't work. How would you make it work from here?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed it. it now runs from the cat directory, may you please chack it for me |
||
| cat ../helper-files/helper-1.txt | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,5 @@ set -euo pipefail | |
| # It looked delicious. | ||
| # I was tempted to take a bite of it. | ||
| # But this seemed like a bad idea... | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, this would work if run from the right folder, but in general it's best to make sh files run from where they are in the checkout structure, or from a clearly defined location identified in a comment in the file (e.g. Module-Tools). |
||
| cat ../helper-files/* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,6 @@ set -euo pipefail | |
| # 1 It looked delicious. | ||
| # 2 I was tempted to take a bite of it. | ||
| # 3 But this seemed like a bad idea... | ||
|
|
||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs the same relative path fix as the previous two comments, but otherwise looks good
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i fixed it |
||
| cat -n ../helper-files/helper-3.txt | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,5 @@ set -euo pipefail | |
| # The output should contain 11 lines. | ||
| # 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.". | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well done, perfect score for sed |
||
| sed -E 's/,([^ ])/, \1/g' input.txt | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost. Your code is giving each player's second score. However the question asks for the last score. Leila only has one score, so you need something slightly different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made changes