<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tail -f /dev/null &#187; substitute</title>
	<atom:link href="http://tfdn.radiofreeomaha.net/tag/substitute/feed/" rel="self" type="application/rss+xml" />
	<link>http://tfdn.radiofreeomaha.net</link>
	<description>Tips, notes, HOWTOs</description>
	<lastBuildDate>Fri, 20 Aug 2010 04:13:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Add A Comma To The End Of A Line</title>
		<link>http://tfdn.radiofreeomaha.net/2009/01/add-a-comma-to-the-end-of-a-line/</link>
		<comments>http://tfdn.radiofreeomaha.net/2009/01/add-a-comma-to-the-end-of-a-line/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 16:59:49 +0000</pubDate>
		<dc:creator>Uncle Jubba</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[substitute]]></category>

		<guid isPermaLink="false">http://tfdn.radiofreeomaha.net/?p=66</guid>
		<description><![CDATA[I work with long lists and WinSQL a lot.  I always find myself wishing these long lists had commas at the end for pasting into a SQL where clause using &#8220;IN&#8221; for the list.  This can be accomplished in one of two ways. From the command line: sed &#34;s/$/,/g&#34; &#60;FILENAME&#62; I usually pipe the output [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I work with long lists and WinSQL a lot.  I always find myself wishing these long lists had commas at the end for pasting into a SQL where clause using &#8220;IN&#8221; for the list.  This can be accomplished in one of two ways.</p>
<p>From the command line:</p>
<pre class="brush: bash">sed &quot;s/$/,/g&quot; &lt;FILENAME&gt;</pre>
<p>I usually pipe the output there to a new file.</p>
<p>In vi (from command mode):</p>
<pre class="brush: bash">:%s/$/,/g</pre>
<p>The &#8220;%&#8221; says to perfom the substitution on the whole file.  In both cases we are doing a substitution of &#8220;$&#8221; (the end of the line) with a &#8220;,&#8221;.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://tfdn.radiofreeomaha.net/2009/01/add-a-comma-to-the-end-of-a-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

