Skip to content

London | 26-Jul-SDC | Roman Sanaye | Sprint 3 | Implement Shell Tools#587

Open
RomanSanaye wants to merge 4 commits into
CodeYourFuture:mainfrom
RomanSanaye:implement-shell-tools
Open

London | 26-Jul-SDC | Roman Sanaye | Sprint 3 | Implement Shell Tools#587
RomanSanaye wants to merge 4 commits into
CodeYourFuture:mainfrom
RomanSanaye:implement-shell-tools

Conversation

@RomanSanaye

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

Implemented shell tools using Node.js.

Changes include:

  • Implemented my own version of the wc command
  • Added functionality to count:
    • Lines
    • Words
    • Characters
  • Added support for processing multiple text files
  • Used Node.js fs module to read and process files
  • Tested the implementation with sample files and compared results with the original wc command

Questions

No questions at the moment.

@RomanSanaye RomanSanaye added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 21, 2026
@SlideGauge SlideGauge added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 23, 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.

Hi Roman - solid grasp of the fundamentals here: your file reading and line/word/char counting all work, and the "total" loop in wc is nicely done. One structural thing is worth stepping back on, though, because it shapes the whole task. Right now there are ~17 scripts - roughly one per example command line - each with the flag and file path hard-coded inside it. When you run the real wc -l sample-files/3.txt, how does wc know both the flag and the file? Take a look at process.argv when you run node wc.js -l sample-files/3.txt - if your script read the flag and filename from there, how many of the README's command lines could a single wc.js handle?

My point is that once the arguments come in rather than being baked into each file, your 17 scripts collapse into three - one cat.js, one ls.js, one wc.js - each acting on whatever it's given. That's really the heart of the task. Could you have a go at rebuilding around argument handling and re-running each README command line against the real tool? Once that's in place I'll do a closer pass on the smaller details. The underlying skills are clearly there - keep going.

The result of the work should be three scripts: a single cat.js, a single ls.js and a single wc.js accepting command line parameters in the same manner as their real counterparts do.

@SlideGauge SlideGauge added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants