Skip to content

Conversation

@SaraTahir28
Copy link

@SaraTahir28 SaraTahir28 commented Nov 22, 2025

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

  1. Implemented cat clone with support for numbering flags, -n and -b
  2. Implemented ls clone with support for ls -1, -a
  3. Implemented custom wc clone supporting line (-l), word (-w), and byte (-c) counts.

Implemented custom versions of wc, ls, and cat with core flags and behaviors to match standard Unix tools. Fixed BSD/macOS cat discrepancy,macOS cat (BSD) resets numbering per file with -n, but my Node.js implementation follows GNU cat behavior, continuing numbering across multiple files.

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@SaraTahir28 SaraTahir28 changed the title WestMidlands|SDC-NOV-2025|Sara Tahir|Sprint-3|Feature/Implement Shell Tools WestMidlands|SDC-NOV-2025|Sara Tahir|Sprint-3|Implement Shell Tools Nov 22, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@SaraTahir28 SaraTahir28 changed the title WestMidlands|SDC-NOV-2025|Sara Tahir|Sprint-3|Implement Shell Tools WestMidlands|SDC-NOV-2025|Sara Tahir|Sprint 3|Implement Shell Tools Nov 22, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

1 similar comment
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@SaraTahir28 SaraTahir28 changed the title WestMidlands|SDC-NOV-2025|Sara Tahir|Sprint 3|Implement Shell Tools WestMidlands | SDC-NOV-2025 | Sara Tahir | Sprint 3 | Implement Shell Tools Nov 22, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

1 similar comment
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@SaraTahir28 SaraTahir28 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 22, 2025
@SaraTahir28 SaraTahir28 force-pushed the Feature/ImplementShell-Nodejs branch from 9983327 to 6152444 Compare November 23, 2025 22:56
@SaraTahir28 SaraTahir28 changed the title WestMidlands | SDC-NOV-2025 | Sara Tahir | Sprint 3 | Implement Shell Tools WestMidlands | SDC-NOV-2025 | SARA TAHIR | Sprint 3 | Implement Shell Tools Dec 1, 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.

Good work on these tasks, sorry for the late review

Good use of comments to explain your code

I've left comments in some areas where you could improve your code

const paddingWidth = 6; // width for line number padding

// Helper function to format a line with numbering
function formatLine(line, lineNumber, numberAll, numberNonBlank) {

Choose a reason for hiding this comment

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

Good idea to pull this function out, but you could have taken advantage of this to reduce the duplication of the string formatting code, which appears twice.

Copy link
Author

Choose a reason for hiding this comment

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

Thankyou for pointing that out, I have removed teh duplication.

Choose a reason for hiding this comment

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

Very nice, cleanly written implementation

totalBytes += byteCount;

let output = "";
if (options.lines) output += `${lineCount} `;

Choose a reason for hiding this comment

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

There is some duplication of your output functions here, is there any way you could reduce this?

Copy link
Author

Choose a reason for hiding this comment

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

yes, I refactored the code with a helper function to format outpts.

@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. labels Dec 17, 2025
@SaraTahir28 SaraTahir28 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 21, 2025
@LonMcGregor
Copy link

Excellent work

@LonMcGregor LonMcGregor removed 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. labels Dec 22, 2025
@LonMcGregor LonMcGregor added the Complete Volunteer to add when work is complete and all review comments have been addressed. label Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants