Skip to content

Commit 1a250cb

Browse files
committed
cat: scaffold command (placeholder, no behavior yet)
1 parent 407b010 commit 1a250cb

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

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();

implement-shell-tools/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"type": "module",
3+
"name": "implement-shell-tools-with-node",
4+
"version": "1.0.0",
5+
"description": "Your task is to re-implement shell tools you have used.",
6+
"main": "index.js",
7+
"scripts": {
8+
"test": "echo \"Error: no test specified\" && exit 1"
9+
},
10+
"author": "pezhman azizi",
11+
"license": "ISC"
12+
}

0 commit comments

Comments
 (0)