One-click install
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill sed-cogni-ai-ou
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: sed
Source: https://github.com/Cogni-AI-OU/cogni-ai-agent-skills/tree/main/sed
Command: npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill sed-cogni-ai-ou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

sed solves the problem of extracting and transforming specific parts of large text files quickly, without loading the whole file or requiring interactive editing.

Core Features & Use Cases

  • Line-range and pattern extraction: Pull exact line segments or capture content between start/end markers for context extraction.
  • Deterministic find-and-replace: Perform non-interactive substitutions for cleanup, normalization, or targeted edits across files.
  • Stream-safe text processing: Handle log or dump snippets in pipelines while minimizing terminal flooding using sed -n where appropriate.

Use cases: extracting a block from a build log for debugging, normalizing text before analysis, or preparing a snippet for a report by selecting only the relevant lines.

Quick Start

Use sed to extract lines 80 to 95 from a large file named app.log: run the command sed -n '80,95p' app.log.

Frequently Asked Questions about sed

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract specific lines from a large log file without loading it entirely?ā–¼

You can extract specific lines from large log files using stream editing with sed. By applying address syntax for line ranges, such as `sed -n '80,95p' app.log`, you pull exact text segments quickly without loading the whole file or requiring interactive editing.

What is the best way to perform automated find-and-replace across text streams in shell scripts?ā–¼

Automated find-and-replace across text streams is handled through deterministic substitutions using sed. This non-interactive method performs safe, targeted edits and text normalization for cleanup tasks directly within shell pipelines and scripts.

How does pattern matching work when extracting text blocks between specific markers?ā–¼

Pattern matching for text extraction works by applying sed address syntax to define regex boundaries. This allows you to capture content between start and end markers, pulling exact text segments or context blocks from files like build logs.

Can I clean up terminal flooding when processing large text dumps in shell pipelines?ā–¼

You can prevent terminal flooding during stream processing by using `sed -n`. This option controls output to print only matching line ranges or patterns, ensuring stream-safe text handling without dumping the entire file content to the console.

Does stream editing require interactive text editor sessions to transform file contents?ā–¼

Stream editing does not require interactive sessions. It enables non-interactive extraction and transformation of specific text segments, allowing you to normalize text, clean streams, and perform find-and-replace operations directly from the command line.