<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Elliott Back's Blog - Latest Comments in Replace, Grep &amp;mdash; Elliott C. Back</title><link>http://elliottbacksblog.disqus.com/</link><description></description><language>en</language><lastBuildDate>Sun, 08 May 2005 20:08:49 -0000</lastBuildDate><item><title>Re: Replace, Grep &amp;mdash; Elliott C. Back</title><link>http://elliottback.com/wp/replace-grep/#comment-3186977</link><description>I used temporary files because for some reason piping this stuff on windows doesn't work properly (i.e., like unix).  If I were on linux, Xander, you got it ;)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Elliott Bäck</dc:creator><pubDate>Sun, 08 May 2005 20:08:49 -0000</pubDate></item><item><title>Re: Replace, Grep &amp;mdash; Elliott C. Back</title><link>http://elliottback.com/wp/replace-grep/#comment-3186976</link><description>Why not use sed? Perl seems like an overkill. And no need for a temporary file if u pipe it.&lt;br&gt;&lt;br&gt;sed s/think/think\n/g jean-thinks.txt | grep think | wc -l</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Xander</dc:creator><pubDate>Sun, 08 May 2005 17:48:41 -0000</pubDate></item><item><title>Re: Replace, Grep &amp;mdash; Elliott C. Back</title><link>http://elliottback.com/wp/replace-grep/#comment-3186975</link><description>Sorry stran, that doesn't work.  That will give you:&lt;br&gt;&lt;br&gt;&lt;blockquote&gt;%grep think' jean-thinks.txt | wc -l&lt;br&gt;6&lt;/blockquote&gt;&lt;br&gt;&lt;br&gt;See, grep counts lines, and there are only 6 lines with 'think' in them.  You really need to split think onto seperate lines first, although the slashes got lost in the post...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Elliott Bäck</dc:creator><pubDate>Fri, 06 May 2005 10:35:03 -0000</pubDate></item><item><title>Re: Replace, Grep &amp;mdash; Elliott C. Back</title><link>http://elliottback.com/wp/replace-grep/#comment-3186974</link><description>%grep 'think' jean-thinks.txt | wc -l &lt;br&gt;14&lt;br&gt;&lt;br&gt;BOOYAH!&lt;br&gt;:^)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">stran</dc:creator><pubDate>Fri, 06 May 2005 09:36:00 -0000</pubDate></item></channel></rss>