diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-18 14:05:18 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-18 14:05:18 +0200 |
| commit | 0d0d936e7b5cd41a31773069540b1ddb8836ef44 (patch) | |
| tree | 273e7ee9a72453655119bf0f63efb9b61e193d7f /course/chapters/03-commands.json | |
| parent | 526c420f4591f0a58f805b473fa76d3da2981eae (diff) | |
newOS4: interactive AI course (terminal module, portal, atlas, telemetry, daily maintenance+cron) + free store card
Diffstat (limited to 'course/chapters/03-commands.json')
| -rw-r--r-- | course/chapters/03-commands.json | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/course/chapters/03-commands.json b/course/chapters/03-commands.json new file mode 100644 index 0000000..10807cb --- /dev/null +++ b/course/chapters/03-commands.json @@ -0,0 +1,119 @@ +{ + "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 <cmd>", + "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" + ] + } + ] +}
\ No newline at end of file |