Skip to content

Manchester | 26-SDC-Jul | Fithi-Teklom | Sprint 1 | Individual-shell-tools#567

Open
Fithi-Teklom wants to merge 4 commits into
CodeYourFuture:mainfrom
Fithi-Teklom:feature/shell-tools-exercises
Open

Manchester | 26-SDC-Jul | Fithi-Teklom | Sprint 1 | Individual-shell-tools#567
Fithi-Teklom wants to merge 4 commits into
CodeYourFuture:mainfrom
Fithi-Teklom:feature/shell-tools-exercises

Conversation

@Fithi-Teklom

Copy link
Copy Markdown

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 shell tools exercises covering ls, cat, wc, grep, sed, and awk.

What was added:

  • Implemented commands to list files and directories using ls.
  • Used cat to read and display file contents.
  • Used wc to count lines, words, and characters.
  • Used grep to search and filter text based on patterns.
  • Used sed for text replacement, deletion, and formatting transformations.
  • Used awk to extract columns, filter data, and perform calculations.

@Fithi-Teklom Fithi-Teklom added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 10, 2026
@github-actions

Copy link
Copy Markdown

Results of test:
Failed awk/script-01.sh, please check
Failed awk/script-02.sh, please check
Failed awk/script-03.sh, please check
Failed awk/script-04.sh, please check
Failed awk/script-05.sh, please check
Failed cat/script-01.sh, please check
Failed cat/script-02.sh, please check
Failed cat/script-03.sh, please check
Failed grep/script-01.sh, please check
Failed grep/script-02.sh, please check
Failed grep/script-03.sh, please check
Failed grep/script-04.sh, please check
Failed grep/script-05.sh, please check
Failed grep/script-06.sh, please check
Failed grep/script-07.sh, please check
Failed ls/script-01.sh, please check
Failed ls/script-02.sh, please check
Failed ls/script-03.sh, please check
Failed ls/script-04.sh, please check
Failed sed/script-01.sh, please check
Failed sed/script-02.sh, please check
Failed sed/script-03.sh, please check
Failed sed/script-04.sh, please check
Failed sed/script-05.sh, please check
Failed sed/script-06.sh, please check
Failed wc/script-01.sh, please check
Failed wc/script-02.sh, please check
Failed wc/script-03.sh, please check
You passed 0/28 tasks.

@Fithi-Teklom Fithi-Teklom changed the title Manchester| 26-SDC-Jul| Fithi-Teklom | Sprint 1 | Module-Tools Manchester | 26-SDC-Jul | Fithi-Teklom | Sprint 1 | Module-Tools Jul 10, 2026
@Fithi-Teklom Fithi-Teklom added the 📅 Sprint 1 Assigned during Sprint 1 of this module label Jul 10, 2026
@Fithi-Teklom Fithi-Teklom changed the title Manchester | 26-SDC-Jul | Fithi-Teklom | Sprint 1 | Module-Tools Manchester | 26-SDC-Jul | Fithi-Teklom | Sprint 1 | Individual-shell-tools Jul 11, 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.

A lot of files do not have trailing new line, add it please as well

# 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.

helper-files/ is a sibling of these folders, not a child.

# 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.

helper-files/ is a sibling of these folders, not a child.

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

cat helper-files/* 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.

helper-files/ is a sibling of these folders, not a child.

# 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.

wc -w 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.

helper-files/ is a sibling of these folders, not a child.

# 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.

helper-files/ is a sibling of these folders, not a child.

# 3 19 92 ../helper-files/helper-3.txt
# 5 30 151 total

wc helper-files/* 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.

helper-files/ is a sibling of these folders, not a child.

# TODO: Write a command to output every line in dialogue.txt said by the Doctor.
# The output should contain 6 lines.

grep "Doctor" dialogue.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does it grabs only lines said by a doctor, not something like "Hello, 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The line is commented, what was intended here to happen?

# TODO: Write a command to output input.txt replacing every occurrence of the string "We'll" with "We will".
# The output should contain 11 lines.

sed "We'll/We will/g" 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.

How does it know which file to look into?

# 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 child-directory

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why is this line commented?

@SlideGauge

Copy link
Copy Markdown

Could you address my comments please?

@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 11, 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