<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - noah</title>
<link>http://snipplr.com/users/noah/tags/search</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 15 Feb 2012 07:31:25 GMT</pubDate>
<item>
<title>(Perl) Search and Replace Across Multiple Files with Perl</title>
<link>http://snipplr.com/view/19732/search-and-replace-across-multiple-files-with-perl/</link>
<description><![CDATA[ <p>This brief script *replaces* the batch search-and-replace tool in your commercial text editor.  If batch file search and replacement is the only reason you need an IDE, you can adopt this script and go back to using Notepad (or better yet `vi`).

Thanks to JPinyan, who taught me the pattern shown below, back in 2001 on `beginners.perl.org`

The regular expression flags used here are explained in excellent detail in the *best practices for regular expressions* chapter of **Perl Best Practices** by Damian Conway.</p> ]]></description>
<pubDate>Tue, 15 Sep 2009 00:18:30 GMT</pubDate>
<guid>http://snipplr.com/view/19732/search-and-replace-across-multiple-files-with-perl/</guid>
</item>
<item>
<title>(Bash) Grep for files that do not match a pattern</title>
<link>http://snipplr.com/view/16699/grep-for-files-that-do-not-match-a-pattern/</link>
<description><![CDATA[ <p>The -L option lists files that do *not* contain a line matching the pattern given.</p> ]]></description>
<pubDate>Mon, 06 Jul 2009 16:37:12 GMT</pubDate>
<guid>http://snipplr.com/view/16699/grep-for-files-that-do-not-match-a-pattern/</guid>
</item>
<item>
<title>(Bash) Filtering the Find command</title>
<link>http://snipplr.com/view/12070/filtering-the-find-command/</link>
<description><![CDATA[ <p>How to filter files and directories with the find command.

The command below finds files that end in "sass," but not the file named "constants.sass," and not the directory "landing_page," nor any of its contents.</p> ]]></description>
<pubDate>Tue, 10 Feb 2009 10:10:21 GMT</pubDate>
<guid>http://snipplr.com/view/12070/filtering-the-find-command/</guid>
</item>
<item>
<title>(Perl) grep with Perl</title>
<link>http://snipplr.com/view/11878/grep-with-perl/</link>
<description><![CDATA[ <p>A combination of the instructions in the book _Minimal Perl_ and [this Perl one-liners page](http://sial.org/howto/perl/one-liner/)

The general form of the one-liner is:

    > perl -wnl -e '/REGEX/ and print $ARGV." $.: $_"; close ARGV if eof' 

The example below shows how to print the hex colors that are defined in a [Sass](http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html) source tree.</p> ]]></description>
<pubDate>Thu, 05 Feb 2009 13:29:59 GMT</pubDate>
<guid>http://snipplr.com/view/11878/grep-with-perl/</guid>
</item>
<item>
<title>(Bash) grep for either of two strings</title>
<link>http://snipplr.com/view/6819/grep-for-either-of-two-strings/</link>
<description><![CDATA[ <p>Here's an example of using grep to filter for links that contain the string 'jpg' or 'gif'</p> ]]></description>
<pubDate>Fri, 20 Jun 2008 15:29:33 GMT</pubDate>
<guid>http://snipplr.com/view/6819/grep-for-either-of-two-strings/</guid>
</item>
<item>
<title>(Bash) Exclude some directories from grep</title>
<link>http://snipplr.com/view/4744/exclude-some-directories-from-grep/</link>
<description><![CDATA[ <p>The following command will grep for a string in HTML files, but will skip the directories dirFoo and dirBar.  (Thanks Jeff)</p> ]]></description>
<pubDate>Wed, 23 Jan 2008 12:44:48 GMT</pubDate>
<guid>http://snipplr.com/view/4744/exclude-some-directories-from-grep/</guid>
</item>
<item>
<title>(Bash) Scrape Google from the command line</title>
<link>http://snipplr.com/view/4299/scrape-google-from-the-command-line/</link>
<description><![CDATA[ <p>This code is POC only -- actually using it would violate Google's TOS, which forbids scraping.  It is published here for educational value only.

Hypothetically, the following command should return a list of the top 500 or so hits in Google for onemorebug.com.

The results will be prepended with digits, followed by a dot and some whitespace (Lynx adds these).

_You must have Lynx and Wget installed on your system for this to work._

Keep in mind that *nix shells don't like it when you double-quote strings, see the comments.</p> ]]></description>
<pubDate>Sun, 09 Dec 2007 21:16:58 GMT</pubDate>
<guid>http://snipplr.com/view/4299/scrape-google-from-the-command-line/</guid>
</item>
<item>
<title>(JavaScript) Find doubled IDs in the DOM</title>
<link>http://snipplr.com/view/3303/find-doubled-ids-in-the-dom/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 14 Jul 2007 14:51:33 GMT</pubDate>
<guid>http://snipplr.com/view/3303/find-doubled-ids-in-the-dom/</guid>
</item>
<item>
<title>(Perl) search and replace across multiple files with Perl</title>
<link>http://snipplr.com/view/3145/search-and-replace-across-multiple-files-with-perl/</link>
<description><![CDATA[ <p>A couple of useful snippets from an article I found at Perl.com

**Perl search-and-replace on the command line.**

All of these should be usable under Cygwin as well.  But remember that bash wants single-quoted strings but MS-DOS shell wants strings to be double-quoted.</p> ]]></description>
<pubDate>Wed, 04 Jul 2007 20:00:52 GMT</pubDate>
<guid>http://snipplr.com/view/3145/search-and-replace-across-multiple-files-with-perl/</guid>
</item>
<item>
<title>(Emacs Lisp) Command to search for TABLE tags</title>
<link>http://snipplr.com/view/2775/command-to-search-for-table-tags/</link>
<description><![CDATA[ <p>Search For Table Tags: find the next</p> ]]></description>
<pubDate>Fri, 01 Jun 2007 17:03:26 GMT</pubDate>
<guid>http://snipplr.com/view/2775/command-to-search-for-table-tags/</guid>
</item>
</channel>
</rss>
