Skip to content

Commit 41ca29e

Browse files
committed
Implement basic cat command
1 parent 3f26722 commit 41ca29e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • implement-shell-tools/cat

implement-shell-tools/cat/cat.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const fs = require("fs");
2+
3+
const filename = process.argv[2];
4+
5+
const content = fs.readFileSync(filename, "utf8");
6+
7+
process.stdout.write(content);

0 commit comments

Comments
 (0)