Skip to content

Conversation

@sarawone
Copy link

Hi. There!

I would like to thank you for reviewing my exercise.
Kindly check and guide me for my exercise..

Thanks and Regards,
AYK

@sarawone sarawone added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 21, 2025
@chinar-amrutkar chinar-amrutkar self-assigned this Jul 22, 2025
@chinar-amrutkar chinar-amrutkar self-requested a review July 22, 2025 09:23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Please ensure this PR only contains files for the shell tools exercises.

Please create another PR for the number systems exercise. Creating a separate branch for this will make things easier :)

@sarawone sarawone added the 📅 Sprint 1 Assigned during Sprint 1 of this module label Jul 29, 2025
@sarawone
Copy link
Author

hello!

I have created another branch for numbering system .

Thanks,
AYK

@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Aug 11, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, good work on this sprint. There are a few different tasks you need to have another look at, I've left some pointer comments on them

set -euo pipefail

# TODO: Write a command to output just the names of each player in London along with the score from their last attempt.
awk '$2 =="London" {print $1,$5}' scores-table.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this still work if the player makes more than a few attempts?

# TODO: Write a command to output the contents of all of the files in the helper-files directory to the terminal.
# We also want to see the line numbers in the output, but we want line numbers not to reset at the start of each file.
cd helper-files
cat helper-1.txt helper-2.txt helper-3.txt | cat -n

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know how to make cat output and number multiple files in a single command?

set -euo pipefail

# TODO: Write a command to output the number of lines in dialogue.txt that contain the word Doctor (regardless of case).
grep -i "Doctor" dialogue.txt | wc -l

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you complete this task only using grep in a single command?

set -euo pipefail

# TODO: Write a command to output every line in dialogue.txt that does not contain the word "Hello" (regardless of case).
grep -v "Hello" dialouge.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task is also asking about case insensitivity here - can you update your solution for that?

set -euo pipefail

# 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.
grep "^Doctor" *.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you build a single grep command that only shows the filename in the output?


# TODO: Write a command which does the same as above, but sorted in the opposite order (oldest first).
cd child-directory
ls -1t | tail -r

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my system tail -r does not seem to be a valid command. Can you complete this only using a single ls command?

set -euo pipefail

# TODO: Write a command to output input.txt removing any line which contains a number.
sed '/^[0-9] [[:space]]/d' input.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary for your regexp to include the [[:space]] test?



# TODO: Write a command to output input.txt with one change:
sed 's/^\([0-9][0-9]*\) \(.*\)/\2 \1/' input.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need two number groups in your regexp here?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants