Skip to content

Commit 984e653

Browse files
committed
Update cat.js
1 parent 8566cc4 commit 984e653

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

  • implement-shell-tools/cat

implement-shell-tools/cat/cat.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ let content = files.map(f => fs.readFileSync(f, "utf8")).join("");
1111

1212
let lines = content.split("\n");
1313

14-
// remove ONLY final empty line caused by trailing newline
1514
if (lines[lines.length - 1] === "") {
1615
lines.pop();
1716
}
@@ -38,5 +37,4 @@ if (showN) {
3837
output = lines;
3938
}
4039

41-
// IMPORTANT: add final newline like real cat
4240
process.stdout.write(output.join("\n") + "\n");

0 commit comments

Comments
 (0)