{ "id": "03-commands", "title": "Command mastery", "icon": "⌨", "level": "beginner", "lessons": [ { "id": "3.1", "title": "Find any command fast", "objective": "Use help, commands and check to discover what exists before guessing.", "minutes": 7, "commands": [ "help", "status" ], "blocks": [ { "type": "text", "text": "`help` groups all 344 commands by the module that owns them." }, { "type": "cmd", "text": "help" }, { "type": "cmd", "text": "help webdav-push" }, { "type": "tip", "text": "`check` shows module requirements — the fastest way to explain a command that is listed but not working." } ], "exercise": { "instruction": "Open the help for `webdav-push`.", "accept": [ "help webdav-push" ], "check": { "type": "command" }, "hint": "Type: help webdav-push" }, "quiz": { "q": "Which command shows usage for one command?", "options": [ "help ", "status", "ls" ], "answer": 0 }, "sources": [ "modules/core/module-system.js", "modules/core/module-manager.js" ] }, { "id": "3.2", "title": "Pipes, grep, sed, tail", "objective": "Combine commands and understand the two semantics that bite: per-line sed and tail -f deltas.", "minutes": 12, "commands": [ "grep", "sed", "tail", "sort", "head" ], "blocks": [ { "type": "text", "text": "Pipes feed one command into the next. `grep` filters lines, `sed` substitutes text, `tail` prints the end of a file." }, { "type": "cmd", "text": "ls | grep txt" }, { "type": "warn", "text": "`sed s/x/y/` substitutes the first match per LINE, not per file. `sed -i` is flagged destructive and needs confirmation." }, { "type": "text", "text": "`tail -f` is interactive and stops with Ctrl+C. AI-initiated commands get a bounded read instead." }, { "type": "cmd", "text": "tail hello.txt" } ], "exercise": { "instruction": "Search the current listing for `txt`.", "accept": [ "ls | grep txt", "grep txt" ], "check": { "type": "command" }, "hint": "Type: ls | grep txt" }, "quiz": { "q": "`sed s/a/b/` replaces…", "options": [ "every match in the file", "the first match on each line", "only the last line" ], "answer": 1 }, "sources": [ "modules/core/module-fs.js", "modules/ext/shell.js", "modules/core/terminal.js" ] } ] }