<?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>American Butifarra &#187; Ext</title> <atom:link href="http://claude.betancourt.us/tag/ext/feed/" rel="self" type="application/rss+xml" /><link>http://claude.betancourt.us</link> <description>Claude Betancourt&#039;s Personal Blog</description> <lastBuildDate>Fri, 16 Dec 2011 02:43:25 +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>To Love One&#8217;s Craft: Fun with grep and RegEx&#8230;</title><link>http://claude.betancourt.us/to-love-ones-craft-fun-with-grep-and-regex/</link> <comments>http://claude.betancourt.us/to-love-ones-craft-fun-with-grep-and-regex/#comments</comments> <pubDate>Fri, 28 Mar 2008 00:35:22 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[How-To]]></category> <category><![CDATA[Ext]]></category> <category><![CDATA[JavaScript]]></category><guid isPermaLink="false">http://claude.betancourt.us/blog/2008/03/27/to-love-ones-craft-fun-with-grep-and-regex/</guid> <description><![CDATA[I just read an interesting post by Dave Nelson (spugbrap) in which he details all the fun he had writing a script to search through Ext JS source code and open it with Textpad. So, I checked the TextPad help &#8230; <a href="http://claude.betancourt.us/to-love-ones-craft-fun-with-grep-and-regex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">I</span> just read an interesting post by Dave Nelson (spugbrap) in which he details all the fun he had writing a script to search through Ext JS source code and open it with Textpad.</p><blockquote><p>So, I checked the TextPad help to see if I could pass in the name of a file containing full file paths for TextPad to open.</p><p>You just need to put an at sign (@) before the filename, and TextPad will look at that file to find a list of files to open. So, I decided to create a temporary file, output the filenames found and converted by my set of commands (above) into that temporary file, and then run TextPad, passing the temporary filename preceded by an @ sign.</p><p><code>textpad $(for g in 'for f in \'grep -Rli "new Ext.Panel" *\'; do (grep -Hn -m 1 "new Ext.Panel" $f | sed -e 's/\(^[^:]\+\):\([0-9]\+\):.*$/\1(\2/g'); done'; do echo 'cygpath -w -a ${g/\(*/}'\(${g/*\(/},'grep -m 1 "new Ext.Panel" ${g/(*/} | sed -e 's/\t/ /g' -e 's/new Ext.Panel.*$//g' | wc -c'\); done) &#038;</code></p><p>I’m sure this could be done more efficiently, but this was a fun challenge to take on, and I managed to find a way to do what I wanted to do.</p></blockquote><p><a href="http://www.spugbrap.com/blog/2008/03/recursively-grep-for-a-substring-open-all-results-in-textpad-with-cursor-positioned-appropriately/">Read on&#8230;</a></p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/to-love-ones-craft-fun-with-grep-and-regex/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: claude.betancourt.us @ 2012-02-07 14:10:41 by W3 Total Cache -->
