Skip to content

Commit 054fcc7

Browse files
committed
cat initial implementation- no flags yet
1 parent 6c80f38 commit 054fcc7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.DS_Store

implement-shell-tools/cat/cat.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env node
2+
// cat.js — scaffold (no functionality yet)
3+
// Next commits will add:
4+
// - basic file output
5+
// - -n (number all lines)
6+
// - -b (number non-blank)
7+
8+
function main() {
9+
const args = process.argv.slice(2);
10+
if (args.length === 0) {
11+
console.error("Usage: node cat.js <file...>");
12+
process.exit(1);
13+
}
14+
console.log("cat: scaffold ready (implementation comes in next commit)");
15+
}
16+
17+
if (require.main === module) main();

0 commit comments

Comments
 (0)