Skip to content

London| 26-jul-sdc| ShaghayeghShirinfar| Sprint 1 | Individual shell tools#546

Open
shaghayeghfar wants to merge 1 commit into
CodeYourFuture:mainfrom
shaghayeghfar:individual-shell-tools
Open

London| 26-jul-sdc| ShaghayeghShirinfar| Sprint 1 | Individual shell tools#546
shaghayeghfar wants to merge 1 commit into
CodeYourFuture:mainfrom
shaghayeghfar:individual-shell-tools

Conversation

@shaghayeghfar

@shaghayeghfar shaghayeghfar commented Jul 2, 2026

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Completed the Bash exercises by implementing the required shell commands

@shaghayeghfar shaghayeghfar added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 3, 2026

@SlideGauge SlideGauge left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job overall, I've got several questions from my side, could you fix them?

# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"No such file or directory.", could you check the file path?

# But this seemed like a bad idea...


cat helper-files/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"No such file or directory.", could you check the file path? Hint, check which folder the script is called from

# 2 I was tempted to take a bite of it.
# 3 But this seemed like a bad idea...

cat -n helper-files/helper-3.txt No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"No such file or directory.", could you check the file path? Hint, check which folder the script is called from


# TODO: Write a command to output the number of words in the file helper-files/helper-3.txt.
# The output should include the number 19. The output should not include the number 92.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"No such file or directory.", could you check the file path? Hint, check which folder the script is called from

# TODO: Write a command to output the number of lines in the file helper-files/helper-3.txt.
# The output should include the number 3. The output should not include the number 19.

wc -l helper-files/helper-3.txt No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"No such file or directory.", could you check the file path? Hint, check which folder the script is called from

# 5 30 151 total


wc helper-files/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"No such file or directory.", could you check the file path? Hint, check which folder the script is called from

# The output should show that dialogue.txt contains 6 lines, dialogue-2.txt contains 2, and dialogue-3.txt contains 0.


grep -ic 'Doctor' *.txt No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

will this match only what doctor said? What about something like "... the doctor!"?

# 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 -li 'Doctor' *.txt No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

will this match only what doctor said? What about something like "... the doctor!"?

# Your output should contain 3 lines, each with one word and one number on it.
# The first line should be "Ahmed 4".

awk '$2=="London" {print $1, $5}' scores-table.txt No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice use of a condition to filter London players! One thing to test: try running this and look closely at Leila's line. What do you get after her name? Now compare the rows in scores-table.txt - how many attempts does Leila have versus Ahmed? If a player has fewer attempts, will $5 always exist for them? Is there a field reference that always points to a player's last attempt, no matter how many they've played?

@SlideGauge SlideGauge 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. labels Jul 5, 2026
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.

2 participants