<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sed on Codrut Constantin Gusoi</title>
    <link>https://www.codrut.pro/tags/sed/</link>
    <description>Recent content in Sed on Codrut Constantin Gusoi</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 25 Sep 2022 10:19:10 +0000</lastBuildDate>
    <atom:link href="https://www.codrut.pro/tags/sed/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Pretty print Linux $PATH</title>
      <link>https://www.codrut.pro/snippets/pretty-print-linux-path/</link>
      <pubDate>Sun, 25 Sep 2022 10:19:10 +0000</pubDate>
      <guid>https://www.codrut.pro/snippets/pretty-print-linux-path/</guid>
      <description>&lt;div class=&#34;tabs tabs-code tabs-right&#34;&gt;&#xA;  &#xA;  &#xA;&#xA;&#xA;&#xA;&lt;style&gt;&#xA;  .tabs input#tab-0-0:checked ~ .tab-content-0-0 {&#xA;    display: block;&#xA;  }&#xA;&lt;/style&gt;&#xA;&#xA;&lt;input type=&#34;radio&#34; class=&#34;tab-input&#34; name=&#34;tab-select-0&#34; id=&#34;tab-0-0&#34; checked/&gt;&#xA;&lt;label for=&#34;tab-0-0&#34; class=&#34;tab-label&#34;&gt;Bash&lt;/label&gt;&#xA;&lt;div class=&#34;tab-content tab-content-0-0&#34;&gt;&#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo $PATH | sed &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;s/:/\n/g&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Replace string in all files with sed</title>
      <link>https://www.codrut.pro/snippets/replace-string-in-all-files-with-sed/</link>
      <pubDate>Sun, 09 May 2021 01:55:19 +0000</pubDate>
      <guid>https://www.codrut.pro/snippets/replace-string-in-all-files-with-sed/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -type f -exec sed -i &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;s/STRING GOES HERE/REPLACEMENT HERE/g&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt; +&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Make sure to escape brackets (&lt;code&gt;\[\]&lt;/code&gt;):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;find . -type f -exec sed -i &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;s|Click \[here\](/here/)!|Click HERE!|g&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt; +&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
