<?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>Solutions Log &#187; Regular Expression</title> <atom:link href="http://solutions.unixsherpa.com/category/programming/language/regular-expression/feed/" rel="self" type="application/rss+xml" /><link>http://solutions.unixsherpa.com</link> <description>by Dan Reiland</description> <lastBuildDate>Tue, 05 Apr 2011 16:42:14 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Replace Pipes with Tabs in a Delimited File</title><link>http://solutions.unixsherpa.com/2009/12/04/replace-pipes-with-tabs-in-a-delimited-file/</link> <comments>http://solutions.unixsherpa.com/2009/12/04/replace-pipes-with-tabs-in-a-delimited-file/#comments</comments> <pubDate>Fri, 04 Dec 2009 20:44:37 +0000</pubDate> <dc:creator>Dan</dc:creator> <category><![CDATA[Apple OSX]]></category> <category><![CDATA[FreeBSD]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Regular Expression]]></category> <category><![CDATA[Shell]]></category> <category><![CDATA[Solaris]]></category> <category><![CDATA[sysadmin]]></category> <category><![CDATA[Windows]]></category><guid
isPermaLink="false">http://solutions.unixsherpa.com/?p=224</guid> <description><![CDATA[Issue: It is often necessary to replace delimiters in a file with a form the receiving party expects. sed is my favorite method of meeting the need. Solution: Replace double pipes with tabs sed 's/&#124;&#124;/ &#160; &#160; &#160; &#160; &#160; /g' file.in &#62; file.out Note: If you find the tab key simply does not work, [...]]]></description> <content:encoded><![CDATA[<p><strong>Issue:</strong><br
/> It is often necessary to replace delimiters in a file with a form the receiving party expects. sed is my favorite method of meeting the need.</p><p><strong>Solution:</strong><br
/> Replace double pipes with tabs</p><div
class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #c20cb9; font-weight: bold;">sed</span> <span
style="color: #ff0000;">'s/||/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /g'</span> file.in <span
style="color: #000000; font-weight: bold;">&gt;</span> file.out</div></div><p><em>Note: If you find the tab key simply does not work, try CTRL+V+I from your terminal.</em><br
/> <em>Reference: <a
href="http://forums.devshed.com/unix-help-35/replacing-tabs-with-spaces-372623.html">http://forums.devshed.com/unix-help-35/replacing-tabs-with-spaces-372623.html</a></em></p><p><strong>Caveats:</strong><br
/> Special consideration (and a regex) will be required for data where delimiters are present in the data itself. Consider your use case and apply appropriately.</p> ]]></content:encoded> <wfw:commentRss>http://solutions.unixsherpa.com/2009/12/04/replace-pipes-with-tabs-in-a-delimited-file/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 1/13 queries in 0.002 seconds using memcached
Object Caching 397/409 objects using memcached
Content Delivery Network via Amazon Web Services: S3: unixsherpa-solutions.s3.amazonaws.com

Served from: solutions.unixsherpa.com @ 2012-02-06 16:13:59 -->
