<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>IT notes - append</title>
    <subtitle>DBRE, AWS platform engineering, PostgreSQL, Linux, FreeBSD, and Rust reference notes.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://nbari.com/tags/append/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://nbari.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2020-03-29T18:29:39+02:00</updated>
    <id>https://nbari.com/tags/append/atom.xml</id>
    <entry xml:lang="en">
        <title>sed append</title>
        <published>2020-03-29T18:29:39+02:00</published>
        <updated>2020-03-29T18:29:39+02:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/sed-append/"/>
        <id>https://nbari.com/sed-append/</id>
        
        <content type="html" xml:base="https://nbari.com/sed-append/">&lt;p&gt;To append a line using &lt;code&gt;sed&lt;/code&gt; that works on macOS:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sed -e &amp;#39;/^telegraf_enab.*/a\&amp;#39;$&amp;#39;\n&amp;#39;&amp;#39;telegraf_user=&amp;quot;root&amp;quot;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If need to do it in multiple files, you could use &lt;code&gt;find&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; find . -name &amp;quot;rc.conf&amp;quot; -exec sed -i &amp;#39;&amp;#39; -e &amp;#39;/^telegraf_enab.*/a\&amp;#39;$&amp;#39;\n&amp;#39;&amp;#39;telegraf_user=&amp;quot;root&amp;quot;&amp;#39; {} \;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;https://stackoverflow.com/a/48406504/1135424&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>combine two images</title>
        <published>2018-10-17T12:39:11+02:00</published>
        <updated>2018-10-17T12:39:11+02:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/combine-two-images/"/>
        <id>https://nbari.com/combine-two-images/</id>
        
        <content type="html" xml:base="https://nbari.com/combine-two-images/">&lt;p&gt;Combine in a single file 2 images:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;convert +append a.png b.png out.png&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;-append&lt;/code&gt; will append vertically instead of horizontally (&lt;code&gt;+&lt;/code&gt;)&lt;/p&gt;
</content>
        
    </entry>
</feed>
