From e1412bc8d457a626cf105d2b68029579919c59a9 Mon Sep 17 00:00:00 2001 From: mirabellemorah Date: Tue, 28 Jul 2026 10:27:02 +0100 Subject: [PATCH 1/7] Commit --- implement-shell-tools/cat/cat.js | 67 ++++++++++++++++++++ implement-shell-tools/cat/package-lock.json | 21 +++++++ implement-shell-tools/cat/package.json | 6 ++ implement-shell-tools/ls/ls.js | 47 ++++++++++++++ implement-shell-tools/ls/package-lock.json | 21 +++++++ implement-shell-tools/ls/package.json | 6 ++ implement-shell-tools/wc/package-lock.json | 21 +++++++ implement-shell-tools/wc/package.json | 6 ++ implement-shell-tools/wc/wc.js | 70 +++++++++++++++++++++ 9 files changed, 265 insertions(+) create mode 100644 implement-shell-tools/cat/cat.js create mode 100644 implement-shell-tools/cat/package-lock.json create mode 100644 implement-shell-tools/cat/package.json create mode 100644 implement-shell-tools/ls/ls.js create mode 100644 implement-shell-tools/ls/package-lock.json create mode 100644 implement-shell-tools/ls/package.json create mode 100644 implement-shell-tools/wc/package-lock.json create mode 100644 implement-shell-tools/wc/package.json create mode 100644 implement-shell-tools/wc/wc.js diff --git a/implement-shell-tools/cat/cat.js b/implement-shell-tools/cat/cat.js new file mode 100644 index 000000000..2c8159255 --- /dev/null +++ b/implement-shell-tools/cat/cat.js @@ -0,0 +1,67 @@ +import { program } from "commander"; +import { promises as fs } from "node:fs"; + +program + .name("cat") + .description("Concatenate and print files") + .argument("", "The file paths to process") + .option("-n", "Number lines") + .option("-b", "Number non-blank lines"); + +program.parse(); + +function parseNumberMode(options) { + if (options.b) { + return "non-blank"; + } else if (options.n) { + return "all"; + } else { + return "none"; + } +} + +function calculatePrefix( + numberMode, + nonBlankLineNumber, + lineNumberIncludingBlanks, + thisLineIsBlank, +) { + if (numberMode === "none") { + return ""; + } + let lineNumber; + if (numberMode === "all") { + lineNumber = lineNumberIncludingBlanks; + } else { + if (thisLineIsBlank) { + return ""; + } else { + lineNumber = nonBlankLineNumber; + } + } + return lineNumber.toString().padStart(6, " ") + " "; +} + +const numberMode = parseNumberMode(program.opts()); + +for (const path of program.args) { + const content = await fs.readFile(path, "utf-8"); + const lines = content.split("\n"); + let nonBlankLineNumber = 1; + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + if (i === lines.length - 1 && line === "") { + break; + } + const prefix = calculatePrefix( + numberMode, + nonBlankLineNumber, + i + 1, + line === "", + ); + console.log(`${prefix}${line}`); + if (line !== "") { + nonBlankLineNumber += 1; + } + } +} diff --git a/implement-shell-tools/cat/package-lock.json b/implement-shell-tools/cat/package-lock.json new file mode 100644 index 000000000..5cc805d7d --- /dev/null +++ b/implement-shell-tools/cat/package-lock.json @@ -0,0 +1,21 @@ +{ + "name": "cat", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "commander": "^15.0.0" + } + }, + "node_modules/commander": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + } + } +} diff --git a/implement-shell-tools/cat/package.json b/implement-shell-tools/cat/package.json new file mode 100644 index 000000000..cddd041aa --- /dev/null +++ b/implement-shell-tools/cat/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "dependencies": { + "commander": "^15.0.0" + } +} diff --git a/implement-shell-tools/ls/ls.js b/implement-shell-tools/ls/ls.js new file mode 100644 index 000000000..5b9f861b6 --- /dev/null +++ b/implement-shell-tools/ls/ls.js @@ -0,0 +1,47 @@ +import { promises as fs } from "node:fs"; +import process from "node:process"; + +const argv = process.argv.slice(2); + +const flags = []; +const paths = []; + +for (const arg of argv) { + if (arg.startsWith("-")) { + flags.push(arg); + } else { + paths.push(arg); + } +} + +const showOnePerLine = flags.includes("-1"); +const showHiddenFiles = flags.includes("-a"); + +let targets = paths; +if (targets.length === 0) { + targets = ["."]; +} + +for (const target of targets) { + const info = await fs.stat(target); + + let namesToShow; + + if (info.isDirectory()) { + namesToShow = await fs.readdir(target); + + if (showHiddenFiles) { + namesToShow = [".", "..", ...namesToShow]; + } else { + namesToShow = namesToShow.filter((name) => !name.startsWith(".")); + } + + namesToShow.sort(); + } else { + namesToShow = [target]; + } + + for (const name of namesToShow) { + console.log(name); + } +} diff --git a/implement-shell-tools/ls/package-lock.json b/implement-shell-tools/ls/package-lock.json new file mode 100644 index 000000000..09674c718 --- /dev/null +++ b/implement-shell-tools/ls/package-lock.json @@ -0,0 +1,21 @@ +{ + "name": "ls", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "commander": "^15.0.0" + } + }, + "node_modules/commander": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + } + } +} diff --git a/implement-shell-tools/ls/package.json b/implement-shell-tools/ls/package.json new file mode 100644 index 000000000..cddd041aa --- /dev/null +++ b/implement-shell-tools/ls/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "dependencies": { + "commander": "^15.0.0" + } +} diff --git a/implement-shell-tools/wc/package-lock.json b/implement-shell-tools/wc/package-lock.json new file mode 100644 index 000000000..116f3635e --- /dev/null +++ b/implement-shell-tools/wc/package-lock.json @@ -0,0 +1,21 @@ +{ + "name": "wc", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "commander": "^15.0.0" + } + }, + "node_modules/commander": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + } + } +} diff --git a/implement-shell-tools/wc/package.json b/implement-shell-tools/wc/package.json new file mode 100644 index 000000000..cddd041aa --- /dev/null +++ b/implement-shell-tools/wc/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "dependencies": { + "commander": "^15.0.0" + } +} diff --git a/implement-shell-tools/wc/wc.js b/implement-shell-tools/wc/wc.js new file mode 100644 index 000000000..0ccacfeaa --- /dev/null +++ b/implement-shell-tools/wc/wc.js @@ -0,0 +1,70 @@ +import { program } from "commander"; +import { promises as fs } from "node:fs"; + +const argv = process.argv.slice(2); + +const flags = argv.filter((arg) => arg.startsWith("-")); +const paths = argv.filter((arg) => !arg.startsWith("-")); + +const showLines = flags.includes("-l"); +const showWords = flags.includes("-w"); +const showBytes = flags.includes("-c"); + +const noFlagsGiven = !showLines && !showWords && !showBytes; + +const columns = []; +if (noFlagsGiven || showLines) columns.push("lines"); +if (noFlagsGiven || showWords) columns.push("words"); +if (noFlagsGiven || showBytes) columns.push("bytes"); + +function countStats(content) { + const lines = (content.match(/\n/g) || []).length; + const words = content.split(/\s+/).filter((w) => w.length > 0).length; + const bytes = Buffer.byteLength(content, "utf-8"); + return { lines, words, bytes }; +} + +// Read every file and collect its stats +const rows = []; +for (const path of paths) { + const content = await fs.readFile(path, "utf-8"); + rows.push({ path, stats: countStats(content) }); +} + +// If there's more than one file, we also need a "total" row at the end +if (rows.length > 1) { + const total = { lines: 0, words: 0, bytes: 0 }; + for (const { stats } of rows) { + total.lines += stats.lines; + total.words += stats.words; + total.bytes += stats.bytes; + } + rows.push({ path: "total", stats: total }); +} + +const needsAlignment = columns.length > 1 || rows.length > 1; + +let width = 0; +if (needsAlignment) { + for (const { stats } of rows) { + for (const col of columns) { + width = Math.max(width, String(stats[col]).length); + } + } + + width = Math.max(width, 3); +} + +for (const { path, stats } of rows) { + const parts = columns.map((col, index) => { + const text = String(stats[col]); + if (!needsAlignment) { + return text; + } + const padded = text.padStart(width, " "); + + return index === 0 ? padded : " " + padded; + }); + + console.log(`${parts.join("")} ${path}`); +} From 1aff98fe0197e016eb49dbbced2d02624eece006 Mon Sep 17 00:00:00 2001 From: mirabellemorah Date: Sun, 9 Aug 2026 01:35:01 +0100 Subject: [PATCH 2/7] ran private tets to understand this better --- .../private-test/package-lock.json | 21 +++++++++++++++ .../private-test/package.json | 6 +++++ implement-shell-tools/private-test/test.js | 27 +++++++++++++++++++ implement-shell-tools/private-test/text.txt | 2 ++ 4 files changed, 56 insertions(+) create mode 100644 implement-shell-tools/private-test/package-lock.json create mode 100644 implement-shell-tools/private-test/package.json create mode 100644 implement-shell-tools/private-test/test.js create mode 100644 implement-shell-tools/private-test/text.txt diff --git a/implement-shell-tools/private-test/package-lock.json b/implement-shell-tools/private-test/package-lock.json new file mode 100644 index 000000000..0bdcfb87e --- /dev/null +++ b/implement-shell-tools/private-test/package-lock.json @@ -0,0 +1,21 @@ +{ + "name": "implement-shell-tools", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "commander": "^15.0.0" + } + }, + "node_modules/commander": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + } + } +} diff --git a/implement-shell-tools/private-test/package.json b/implement-shell-tools/private-test/package.json new file mode 100644 index 000000000..cddd041aa --- /dev/null +++ b/implement-shell-tools/private-test/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "dependencies": { + "commander": "^15.0.0" + } +} diff --git a/implement-shell-tools/private-test/test.js b/implement-shell-tools/private-test/test.js new file mode 100644 index 000000000..45947c6fa --- /dev/null +++ b/implement-shell-tools/private-test/test.js @@ -0,0 +1,27 @@ +import { program } from "commander"; +import { promises as fs } from "node:fs"; +import process from "node:process"; + +program + .name("count-containing-words") + .description("Counts words in a file that contain a particular character") + .option("-c, --char ", "The character to search for", "e") + .argument("", "The file path to process"); + +program.parse(); + +const argv = program.args; +if (argv.length != 1) { + console.error( + `Expected exactly 1 argument (a path) to be passed but got ${argv.length}.`, + ); + process.exit(1); +} +const path = argv[0]; +const char = program.opts().char; + +const content = await fs.readFile(path, "utf-8"); +const countOfWordsContainingChar = content + .split(" ") + .filter((word) => word.includes(char)).length; +console.log(countOfWordsContainingChar); diff --git a/implement-shell-tools/private-test/text.txt b/implement-shell-tools/private-test/text.txt new file mode 100644 index 000000000..d1b448c08 --- /dev/null +++ b/implement-shell-tools/private-test/text.txt @@ -0,0 +1,2 @@ +hello baby gorl +i like you \ No newline at end of file From af61ea966947f0e106747df0c1c8edc1d2e6a9c1 Mon Sep 17 00:00:00 2001 From: mirabellemorah Date: Sun, 9 Aug 2026 02:50:44 +0100 Subject: [PATCH 3/7] run cat version --- implement-shell-tools/cat/cat.js | 89 ++++++++++++++------------------ 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/implement-shell-tools/cat/cat.js b/implement-shell-tools/cat/cat.js index 2c8159255..df39e9692 100644 --- a/implement-shell-tools/cat/cat.js +++ b/implement-shell-tools/cat/cat.js @@ -2,66 +2,55 @@ import { program } from "commander"; import { promises as fs } from "node:fs"; program - .name("cat") - .description("Concatenate and print files") + .name("check-for-cat") + .description("Implement my own version of cat") .argument("", "The file paths to process") .option("-n", "Number lines") .option("-b", "Number non-blank lines"); program.parse(); -function parseNumberMode(options) { - if (options.b) { - return "non-blank"; - } else if (options.n) { - return "all"; - } else { - return "none"; - } -} +const paths = program.args; +const showN = program.opts().n; +const showB = program.opts().b; + +let lineNumber = 1; -function calculatePrefix( - numberMode, - nonBlankLineNumber, - lineNumberIncludingBlanks, - thisLineIsBlank, -) { - if (numberMode === "none") { - return ""; +for (const path of paths) { + const content = await fs.readFile(path, "utf-8"); + + // Split into lines. If the file ends with a newline, split() leaves an + // extra empty string at the end - remove that so we don't print a + // phantom blank line. + const endsWithNewline = content.endsWith("\n"); + let lines = content.split("\n"); + if (endsWithNewline) { + lines.pop(); } - let lineNumber; - if (numberMode === "all") { - lineNumber = lineNumberIncludingBlanks; - } else { - if (thisLineIsBlank) { - return ""; + + lines = lines.map((line) => { + if (showB) { + + if (line === "") { + return line; + } + const numbered = String(lineNumber).padStart(6, " ") + "\t" + line; + lineNumber++; + return numbered; + } else if (showN) { + + const numbered = String(lineNumber).padStart(6, " ") + "\t" + line; + lineNumber++; + return numbered; } else { - lineNumber = nonBlankLineNumber; + + return line; } - } - return lineNumber.toString().padStart(6, " ") + " "; -} - -const numberMode = parseNumberMode(program.opts()); + }); -for (const path of program.args) { - const content = await fs.readFile(path, "utf-8"); - const lines = content.split("\n"); - let nonBlankLineNumber = 1; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (i === lines.length - 1 && line === "") { - break; - } - const prefix = calculatePrefix( - numberMode, - nonBlankLineNumber, - i + 1, - line === "", - ); - console.log(`${prefix}${line}`); - if (line !== "") { - nonBlankLineNumber += 1; - } + let output = lines.join("\n"); + if (endsWithNewline) { + output += "\n"; } + process.stdout.write(output); } From 93a4eadefdded63646502ab44f90f89471e7e87f Mon Sep 17 00:00:00 2001 From: mirabellemorah Date: Sun, 9 Aug 2026 04:15:06 +0100 Subject: [PATCH 4/7] adjusted naming convention for ls --- implement-shell-tools/cat/cat.js | 3 -- implement-shell-tools/ls/ls.js | 52 +++++++++++++++----------------- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/implement-shell-tools/cat/cat.js b/implement-shell-tools/cat/cat.js index df39e9692..7680ac341 100644 --- a/implement-shell-tools/cat/cat.js +++ b/implement-shell-tools/cat/cat.js @@ -19,9 +19,6 @@ let lineNumber = 1; for (const path of paths) { const content = await fs.readFile(path, "utf-8"); - // Split into lines. If the file ends with a newline, split() leaves an - // extra empty string at the end - remove that so we don't print a - // phantom blank line. const endsWithNewline = content.endsWith("\n"); let lines = content.split("\n"); if (endsWithNewline) { diff --git a/implement-shell-tools/ls/ls.js b/implement-shell-tools/ls/ls.js index 5b9f861b6..91c4fec0b 100644 --- a/implement-shell-tools/ls/ls.js +++ b/implement-shell-tools/ls/ls.js @@ -1,47 +1,43 @@ +import { program } from "commander"; import { promises as fs } from "node:fs"; -import process from "node:process"; -const argv = process.argv.slice(2); +program + .name("check-for-ls") + .description("Implement my own version of ls") + .argument("[paths...]", "The file paths to process") + .option("-1, --one", "This lists one file per line") + .option("-a", "This shows all files"); -const flags = []; -const paths = []; +program.parse(); -for (const arg of argv) { - if (arg.startsWith("-")) { - flags.push(arg); - } else { - paths.push(arg); - } -} +const showOneLine = program.opts().one; +const showAllFiles = program.opts().a; -const showOnePerLine = flags.includes("-1"); -const showHiddenFiles = flags.includes("-a"); +const paths = program.args; -let targets = paths; -if (targets.length === 0) { - targets = ["."]; +let filePath = paths; +if (filePath.length === 0) { + filePath = ["."]; } -for (const target of targets) { +for (const target of filePath) { const info = await fs.stat(target); - let namesToShow; - + let showFiles; if (info.isDirectory()) { - namesToShow = await fs.readdir(target); + showFiles = await fs.readdir(target); - if (showHiddenFiles) { - namesToShow = [".", "..", ...namesToShow]; + if (showAllFiles) { + showFiles = [".", "..", ...showFiles]; } else { - namesToShow = namesToShow.filter((name) => !name.startsWith(".")); + showFiles = showFiles.filter((name) => !name.startsWith(".")); } - - namesToShow.sort(); + showFiles.sort(); } else { - namesToShow = [target]; + showFiles = [target]; } - for (const name of namesToShow) { - console.log(name); + for (const file of showFiles) { + console.log(file); } } From 52bd0e264983c96357baf1776d0571f8b437a239 Mon Sep 17 00:00:00 2001 From: mirabellemorah Date: Sun, 9 Aug 2026 04:48:55 +0100 Subject: [PATCH 5/7] implementing wc --- implement-shell-tools/ls/ls.js | 1 - implement-shell-tools/wc/wc.js | 106 ++++++++++++++++++--------------- 2 files changed, 57 insertions(+), 50 deletions(-) diff --git a/implement-shell-tools/ls/ls.js b/implement-shell-tools/ls/ls.js index 91c4fec0b..4cee01887 100644 --- a/implement-shell-tools/ls/ls.js +++ b/implement-shell-tools/ls/ls.js @@ -12,7 +12,6 @@ program.parse(); const showOneLine = program.opts().one; const showAllFiles = program.opts().a; - const paths = program.args; let filePath = paths; diff --git a/implement-shell-tools/wc/wc.js b/implement-shell-tools/wc/wc.js index 0ccacfeaa..63657c927 100644 --- a/implement-shell-tools/wc/wc.js +++ b/implement-shell-tools/wc/wc.js @@ -1,70 +1,78 @@ import { program } from "commander"; import { promises as fs } from "node:fs"; -const argv = process.argv.slice(2); +program + .name("check-for-wc") + .description("Implement my own version of wc") + .argument("", "The file paths to process") + .option("-l", "Counts the total number of lines") + .option("-c", "Counts the total number of characters") + .option("-w", "Counts the total number of words"); -const flags = argv.filter((arg) => arg.startsWith("-")); -const paths = argv.filter((arg) => !arg.startsWith("-")); +program.parse(); -const showLines = flags.includes("-l"); -const showWords = flags.includes("-w"); -const showBytes = flags.includes("-c"); +/// -const noFlagsGiven = !showLines && !showWords && !showBytes; +const paths = program.args; +const showLines = program.opts().l; +const showWords = program.opts().w; +const showChar = program.opts().c; + +const noFlagsGiven = !showLines && !showWords && !showChar; const columns = []; -if (noFlagsGiven || showLines) columns.push("lines"); -if (noFlagsGiven || showWords) columns.push("words"); -if (noFlagsGiven || showBytes) columns.push("bytes"); - -function countStats(content) { - const lines = (content.match(/\n/g) || []).length; - const words = content.split(/\s+/).filter((w) => w.length > 0).length; - const bytes = Buffer.byteLength(content, "utf-8"); - return { lines, words, bytes }; -} -// Read every file and collect its stats -const rows = []; for (const path of paths) { const content = await fs.readFile(path, "utf-8"); - rows.push({ path, stats: countStats(content) }); -} -// If there's more than one file, we also need a "total" row at the end -if (rows.length > 1) { - const total = { lines: 0, words: 0, bytes: 0 }; - for (const { stats } of rows) { - total.lines += stats.lines; - total.words += stats.words; - total.bytes += stats.bytes; - } - rows.push({ path: "total", stats: total }); -} + const lineCount = content.split("\n").length - 1; -const needsAlignment = columns.length > 1 || rows.length > 1; + const wordCount = content + .split(/\s+/) + .filter((word) => word.length > 0).length; -let width = 0; -if (needsAlignment) { - for (const { stats } of rows) { - for (const col of columns) { - width = Math.max(width, String(stats[col]).length); - } - } + const charCount = Buffer.byteLength(content, "utf-8"); - width = Math.max(width, 3); + columns.push({ + path: path, + lines: lineCount, + words: wordCount, + char: charCount, + }); } +if (columns.length > 1) { + let totalLines = 0; + let totalWords = 0; + let totalChar = 0; -for (const { path, stats } of rows) { - const parts = columns.map((col, index) => { - const text = String(stats[col]); - if (!needsAlignment) { - return text; - } - const padded = text.padStart(width, " "); + for (const result of columns) { + totalLines += result.lines; + totalWords += result.words; + totalChar += result.char; + } - return index === 0 ? padded : " " + padded; + columns.push({ + path: "total", + lines: totalLines, + words: totalWords, + char: totalChar, }); +} + +for (const result of columns) { + let line = ""; + + if (noFlagsGiven || showLines) { + line += String(result.lines).padStart(6, " "); + } + if (noFlagsGiven || showWords) { + line += String(result.words).padStart(6, " "); + } + if (noFlagsGiven || showChar) { + line += String(result.char).padStart(6, " "); + } + + line += " " + result.path; - console.log(`${parts.join("")} ${path}`); + console.log(line); } From 8333cbdfe600d07a63989c6727bb1f97474f65d6 Mon Sep 17 00:00:00 2001 From: mirabellemorah Date: Sun, 9 Aug 2026 05:25:07 +0100 Subject: [PATCH 6/7] ls fixed --- implement-shell-tools/ls/ls.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/implement-shell-tools/ls/ls.js b/implement-shell-tools/ls/ls.js index 4cee01887..5c3a3156c 100644 --- a/implement-shell-tools/ls/ls.js +++ b/implement-shell-tools/ls/ls.js @@ -36,7 +36,11 @@ for (const target of filePath) { showFiles = [target]; } - for (const file of showFiles) { - console.log(file); + if (showOneLine) { + for (const file of showFiles) { + console.log(file); + } + } else { + console.log(showFiles.join(" ")); } } From 3efb425938388dacc8095ae4dd32860637319eb8 Mon Sep 17 00:00:00 2001 From: Mirabelle Morah <160764256+mirabellemorah@users.noreply.github.com> Date: Mon, 10 Aug 2026 05:06:10 +0100 Subject: [PATCH 7/7] Clean up wc.js by removing commentsremoved /// Removed unnecessary comment lines from wc.js. --- implement-shell-tools/wc/wc.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/implement-shell-tools/wc/wc.js b/implement-shell-tools/wc/wc.js index 63657c927..4a51e4f69 100644 --- a/implement-shell-tools/wc/wc.js +++ b/implement-shell-tools/wc/wc.js @@ -11,8 +11,6 @@ program program.parse(); -/// - const paths = program.args; const showLines = program.opts().l; const showWords = program.opts().w;