<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: grep is a beautiful tool</title>
	<atom:link href="http://eriwen.com/tools/grep-is-a-beautiful-tool/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/</link>
	<description>Programming productively with open-source tools</description>
	<lastBuildDate>Fri, 11 May 2012 19:13:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: A few helpful command line tools &#171; albert causo</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-6190</link>
		<dc:creator>A few helpful command line tools &#171; albert causo</dc:creator>
		<pubDate>Tue, 24 May 2011 03:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-6190</guid>
		<description>[...] grep [...]</description>
		<content:encoded><![CDATA[<p>[...] grep [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: grep for pdfs &#124; MyGNU.de</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-3989</link>
		<dc:creator>grep for pdfs &#124; MyGNU.de</dc:creator>
		<pubDate>Tue, 09 Nov 2010 08:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-3989</guid>
		<description>[...] text in multiple files.Â  If you donÂ´t know it already you can find some information about grep here.Â  Sadly it can not be used for searching in pdf files, which is certainly an important task. [...]</description>
		<content:encoded><![CDATA[<p>[...] text in multiple files.Â  If you donÂ´t know it already you can find some information about grep here.Â  Sadly it can not be used for searching in pdf files, which is certainly an important task. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasudev Ram</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-3259</link>
		<dc:creator>Vasudev Ram</dc:creator>
		<pubDate>Fri, 14 May 2010 15:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-3259</guid>
		<description>find with xargs and any other command is quite powerful, though, of course.</description>
		<content:encoded><![CDATA[<p>find with xargs and any other command is quite powerful, though, of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasudev Ram</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-3258</link>
		<dc:creator>Vasudev Ram</dc:creator>
		<pubDate>Fri, 14 May 2010 15:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-3258</guid>
		<description>Actually, on UNIX / Linux and variants (and maybe also on Windows with Cygwin - though you may have to test that), this works for what Bob wants (and is simpler, since you don&#039;t need to use find with grep for this):

grep &#039;object&#039; *.pas *.dfm *.any_other_number_of_extensions_or_patterns

# Doesn&#039;t even have to be a filename extension, e.g.:

grep &#039;object&#039; *abc* def* *ghi jkl*mno* # and so on ...

And this - i.e. the ability to pass any number of any kind of wildcard patterns in the arguments to a command - works for ALL commands at the *nix command line - the reason for it is a little known fact - that the wildcard (and more generally, *nix metacharacter expansion) is handled by the _shell_ (bash, ksh, etc.) - BEFORE the shell invokes the command at all. That is, the shell does all the expansions of metacharacters and then invokes the command with the expanded command line. (Contrast this with DOS where the wildcard expansion is handled by individual commands and so works only for those commands which implement it internally.) See Kernighan and Pike - The UNIX Programming Environment - for more on this.

HTH
Vasudev</description>
		<content:encoded><![CDATA[<p>Actually, on UNIX / Linux and variants (and maybe also on Windows with Cygwin &#8211; though you may have to test that), this works for what Bob wants (and is simpler, since you don&#8217;t need to use find with grep for this):</p>
<p>grep &#8216;object&#8217; *.pas *.dfm *.any_other_number_of_extensions_or_patterns</p>
<p># Doesn&#8217;t even have to be a filename extension, e.g.:</p>
<p>grep &#8216;object&#8217; *abc* def* *ghi jkl*mno* # and so on &#8230;</p>
<p>And this &#8211; i.e. the ability to pass any number of any kind of wildcard patterns in the arguments to a command &#8211; works for ALL commands at the *nix command line &#8211; the reason for it is a little known fact &#8211; that the wildcard (and more generally, *nix metacharacter expansion) is handled by the _shell_ (bash, ksh, etc.) &#8211; BEFORE the shell invokes the command at all. That is, the shell does all the expansions of metacharacters and then invokes the command with the expanded command line. (Contrast this with DOS where the wildcard expansion is handled by individual commands and so works only for those commands which implement it internally.) See Kernighan and Pike &#8211; The UNIX Programming Environment &#8211; for more on this.</p>
<p>HTH<br />
Vasudev</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-3257</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Fri, 14 May 2010 14:50:34 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-3257</guid>
		<description>Yeah, I just use 

find . -name \*.pas -o -name \*.dfm &#124; xargs grep -nP &#039;object&#039;

Find/grep is a powerful combo :)</description>
		<content:encoded><![CDATA[<p>Yeah, I just use </p>
<p>find . -name \*.pas -o -name \*.dfm | xargs grep -nP &#8216;object&#8217;</p>
<p>Find/grep is a powerful combo :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-3256</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Fri, 14 May 2010 14:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-3256</guid>
		<description>Is there a way to search multiple file extensions without having to type multiple &#039;--include&#039; statements?  It would be nice to be able to do something like this:

grep -r --include=*.pas;*.dfm &#039;object&#039; .

But this doesn&#039;t seem to work.  Any insights?</description>
		<content:encoded><![CDATA[<p>Is there a way to search multiple file extensions without having to type multiple &#8216;&#8211;include&#8217; statements?  It would be nice to be able to do something like this:</p>
<p>grep -r &#8211;include=*.pas;*.dfm &#8216;object&#8217; .</p>
<p>But this doesn&#8217;t seem to work.  Any insights?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2009-03-04 &#124; it's about time</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-2218</link>
		<dc:creator>links for 2009-03-04 &#124; it's about time</dc:creator>
		<pubDate>Wed, 04 Mar 2009 10:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-2218</guid>
		<description>[...] grep is a beautiful tool - Eric Wendelinâ€™s Blog Global Regular Expression Print is a staple of every command-line userâ€™s toolbox. As with find, it derives a lot of power from being combined with other tools and can increase your productivity significantly. Following is a simple tutorial that will help you realize the power of this simple and most useful command. (tags: reference howto tutorial linux unix bash shell commands grep) [...]</description>
		<content:encoded><![CDATA[<p>[...] grep is a beautiful tool &#8211; Eric Wendelinâ€™s Blog Global Regular Expression Print is a staple of every command-line userâ€™s toolbox. As with find, it derives a lot of power from being combined with other tools and can increase your productivity significantly. Following is a simple tutorial that will help you realize the power of this simple and most useful command. (tags: reference howto tutorial linux unix bash shell commands grep) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: richard</title>
		<link>http://eriwen.com/tools/grep-is-a-beautiful-tool/#comment-2015</link>
		<dc:creator>richard</dc:creator>
		<pubDate>Sat, 29 Nov 2008 02:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=60#comment-2015</guid>
		<description>I would like to have a conversion doc to transcribe from OS 9 arabic fonts to OS X arabic fonts. I wrote a page of equivalences a=^ and in BBedit noticed grep has a base there but how would I write a command line such that all the individual letters change at once? Or can i pay someone to write it?
thanks</description>
		<content:encoded><![CDATA[<p>I would like to have a conversion doc to transcribe from OS 9 arabic fonts to OS X arabic fonts. I wrote a page of equivalences a=^ and in BBedit noticed grep has a base there but how would I write a command line such that all the individual letters change at once? Or can i pay someone to write it?<br />
thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

