<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Sed on BAFM</title><link>https://christian.blog.pakiheim.de/tags/sed/</link><description>Recent content in Sed on BAFM</description><generator>Hugo -- 0.160.1</generator><language>en</language><lastBuildDate>Tue, 24 Jun 2008 17:35:42 +0000</lastBuildDate><atom:link href="https://christian.blog.pakiheim.de/tags/sed/index.xml" rel="self" type="application/rss+xml"/><item><title>Removing newlines (n) with sed</title><link>https://christian.blog.pakiheim.de/posts/2008-06-24_removing-newlines-n-with-sed/</link><pubDate>Tue, 24 Jun 2008 17:35:42 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=386</guid><description>&lt;p&gt;Today I had to search again on how to remove newline special characters with sed. Thanks to &lt;a href="http://kamil.dsplabs.com.au/resume/"&gt;Kamil&lt;/a&gt; over at &lt;a href="http://linux.dsplabs.com.au/"&gt;linux.dsplabs.com.au&lt;/a&gt;, I found &lt;a href="http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/"&gt;it&lt;/a&gt; again rather quickly.&lt;/p&gt;
&lt;p&gt;Now, this is just for my own safekeeping, so I don&amp;rsquo;t end up googling for it again &amp;hellip; &amp;#x1f937;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt" id="hl-0-1"&gt;&lt;a class="lnlinks" href="#hl-0-1"&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;echo -e &amp;#34;Line containing nnewlines!&amp;#34; | sed &amp;#39;:a;N;$!ba;s/n//g&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Praise teh sed</title><link>https://christian.blog.pakiheim.de/posts/2007-08-06_praise-teh-sed/</link><pubDate>Mon, 06 Aug 2007 22:56:22 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/2007/08/05/praise-teh-sed/</guid><description>&lt;p&gt;Since my talk with &lt;a href="http://robbat2.livejournal.com/"&gt;Robin&lt;/a&gt; on Thursday regarding the &lt;a href="https://bugs.gentoo.org/show_bug.cgi?id=129355"&gt;autogenerated &lt;em&gt;userinfo.xml&lt;/em&gt;&lt;/a&gt;, I finally found some time today to get all the info&amp;rsquo;s I need out of &lt;em&gt;userinfo.xml&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Since I don&amp;rsquo;t really want to manually enter all those mail addresses from &lt;em&gt;userinfo&lt;/em&gt; into LDAP manually, I figured sed might be my best friend. &lt;em&gt;&lt;strong&gt;BUT&lt;/strong&gt;&lt;/em&gt; &lt;em&gt;sed&lt;/em&gt; ain&amp;rsquo;t easy .. But thanks to Fabian and Gilles, I learned something new about &lt;em&gt;sed&lt;/em&gt; today ..&lt;/p&gt;
&lt;p&gt;Basically I searched for a way to transform &lt;em&gt;userinfo.xml&lt;/em&gt; into a datafile for &lt;em&gt;ldapedit&lt;/em&gt;.&lt;/p&gt;</description></item></channel></rss>