<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=Sed</id>
	<title>Sed - revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=Sed"/>
	<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Sed&amp;action=history"/>
	<updated>2026-07-11T17:53:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=Sed&amp;diff=6975&amp;oldid=prev</id>
		<title>Dank: /* Join pairs of lines */</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Sed&amp;diff=6975&amp;oldid=prev"/>
		<updated>2020-08-23T13:14:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Join pairs of lines&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:14, 23 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Recipes==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Recipes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Join pairs of lines===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Join pairs of lines===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tt&amp;gt;sed &#039;N;s/\n/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,&lt;/del&gt;/&#039;&amp;lt;/tt&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tt&amp;gt;sed &#039;N;s/\n/ /&#039;&amp;lt;/tt&amp;gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;replaces every other newline with a space. Replace the space with whatever you want.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-6974:rev-6975:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=Sed&amp;diff=6974&amp;oldid=prev</id>
		<title>Dank: Created page with &quot;The &#039;&#039;&#039;s&#039;&#039;&#039;tream &#039;&#039;&#039;ed&#039;&#039;&#039;itor. Sometimes the &#039;&#039;&#039;s&#039;&#039;&#039;hitty &#039;&#039;&#039;ed&#039;&#039;&#039;itor. &lt;tt&gt;sed&lt;/tt&gt; works on lines at a time (mostly). Note that GNU and POSIX &lt;tt&gt;sed&lt;/tt&gt; differ in some sig...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Sed&amp;diff=6974&amp;oldid=prev"/>
		<updated>2020-08-23T12:56:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;s&amp;#039;&amp;#039;&amp;#039;tream &amp;#039;&amp;#039;&amp;#039;ed&amp;#039;&amp;#039;&amp;#039;itor. Sometimes the &amp;#039;&amp;#039;&amp;#039;s&amp;#039;&amp;#039;&amp;#039;hitty &amp;#039;&amp;#039;&amp;#039;ed&amp;#039;&amp;#039;&amp;#039;itor. &amp;lt;tt&amp;gt;sed&amp;lt;/tt&amp;gt; works on lines at a time (mostly). Note that GNU and POSIX &amp;lt;tt&amp;gt;sed&amp;lt;/tt&amp;gt; differ in some sig...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;s&amp;#039;&amp;#039;&amp;#039;tream &amp;#039;&amp;#039;&amp;#039;ed&amp;#039;&amp;#039;&amp;#039;itor. Sometimes the &amp;#039;&amp;#039;&amp;#039;s&amp;#039;&amp;#039;&amp;#039;hitty &amp;#039;&amp;#039;&amp;#039;ed&amp;#039;&amp;#039;&amp;#039;itor. &amp;lt;tt&amp;gt;sed&amp;lt;/tt&amp;gt; works on lines at a time (mostly). Note that GNU and POSIX &amp;lt;tt&amp;gt;sed&amp;lt;/tt&amp;gt; differ in some significant ways.&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;tt&amp;gt;-i&amp;lt;/tt&amp;gt; to run &amp;lt;tt&amp;gt;sed&amp;lt;/tt&amp;gt; on a file inline. Never use e.g. &amp;lt;tt&amp;gt;cat file | sed &amp;gt; file&amp;lt;/tt&amp;gt;; the shell redirection is going to open &amp;lt;tt&amp;gt;file&amp;lt;/tt&amp;gt; for writing with truncation, which is probably not what you want. Supply expressions on the command line with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, and/or files of expressions with &amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Recipes==&lt;br /&gt;
===Join pairs of lines===&lt;br /&gt;
&amp;lt;tt&amp;gt;sed &amp;#039;N;s/\n/,/&amp;#039;&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
</feed>