<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stream Editor on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/stream-editor/</link><description>Recent content in Stream Editor on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 30 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/stream-editor/index.xml" rel="self" type="application/rss+xml"/><item><title>Sed Streamline - Linux Text Crafting Essentials</title><link>https://ai-blog.noorshomelab.dev/cut-the-chase/sed-streamline/</link><pubDate>Tue, 30 Dec 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/cut-the-chase/sed-streamline/</guid><description>&lt;h1 id="sed-streamline---linux-text-crafting-essentials"&gt;Sed Streamline - Linux Text Crafting Essentials&lt;/h1&gt;
&lt;p&gt;GNU sed 4.9 (stable as of 2025-12-30). A stream editor for filtering and transforming text.&lt;/p&gt;
&lt;h2 id="core-syntax"&gt;Core Syntax&lt;/h2&gt;
&lt;p&gt;The fundamental operation in &lt;code&gt;sed&lt;/code&gt; is substitution. This block demonstrates basic text replacement.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre class="language-bash line-numbers" data-start="1" tabindex="0"&gt;&lt;code class="language-bash" data-lang="bash"&gt;# Example file content:
# line 1: This is a test.
# line 2: Another test line.
# line 3: Test complete.
# Basic substitution: &amp;#39;s/regexp/replacement/flags&amp;#39;
echo &amp;#34;This is a test.&amp;#34; | sed &amp;#39;s/test/example/&amp;#39; # Replaces &amp;#39;test&amp;#39; with &amp;#39;example&amp;#39; on the first match per line.
# Output: This is a example.
# Global substitution (g flag): replaces all occurrences on a line.
echo &amp;#34;test test test&amp;#34; | sed &amp;#39;s/test/ok/g&amp;#39; # Replaces all &amp;#39;test&amp;#39; with &amp;#39;ok&amp;#39;.
# Output: ok ok ok
# Case-insensitive substitution (I flag - GNU sed extension).
echo &amp;#34;This Is A Test.&amp;#34; | sed &amp;#39;s/test/success/I&amp;#39; # Replaces &amp;#39;Test&amp;#39; with &amp;#39;success&amp;#39;, ignoring case.
# Output: This Is A success.&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2 id="essential-patterns"&gt;Essential Patterns&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;sed&lt;/code&gt; excels at filtering and deleting lines based on patterns or line numbers.&lt;/p&gt;</description></item></channel></rss>