<?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>Jess Barnes &#187; bash</title>
	<atom:link href="http://jessbarnes.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://jessbarnes.com</link>
	<description>Geek / Libertarian / Skeptic / Cook</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:59:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Bash alias to search file contents</title>
		<link>http://jessbarnes.com/2009/12/bash-alias-to-search-file-contents/</link>
		<comments>http://jessbarnes.com/2009/12/bash-alias-to-search-file-contents/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 13:53:35 +0000</pubDate>
		<dc:creator>Jess Barnes</dc:creator>
				<category><![CDATA[Code Stuff]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://jessbarnes.com/2009/12/30/</guid>
		<description><![CDATA[This simple Bash alias will search the contents of every file in the current directory (and sub-directories) and return the file names. Very handy when trying to work out which file generated which HTML in large PHP based applications or &#8230; <a href="http://jessbarnes.com/2009/12/bash-alias-to-search-file-contents/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://jessbarnes.com/2010/03/php-function-to-generate-a-slug-for-seo-urls/' rel='bookmark' title='PHP function to generate a slug for SEO URLs'>PHP function to generate a slug for SEO URLs</a></li>
<li><a href='http://jessbarnes.com/2010/10/hanging-server-log-the-output-of-top-to-a-file/' rel='bookmark' title='Hanging server? Log the output of top to a file'>Hanging server? Log the output of top to a file</a></li>
<li><a href='http://jessbarnes.com/2009/12/mysql-string-escaping-in-php/' rel='bookmark' title='MySQL string escaping in PHP'>MySQL string escaping in PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This simple Bash alias will search the contents of every file in the current directory (and sub-directories) and return the file names. Very handy when trying to work out which file generated which HTML in large PHP based applications or when trying to find every last instance of a particular string in a bunch of config files.</p>
<pre class="brush: bash; title: ; notranslate">
# Search In Files
sif() {
    grep -EiIrl &quot;$*&quot; ./*
}
</pre>
<p>Either use the grep command by itself, replacing the $* with your search string for a one time use, or add this to your .bashrc file to be able to search by typing: <code>sif <em>search string</em></code></p>
<p>Related posts:<ol>
<li><a href='http://jessbarnes.com/2010/03/php-function-to-generate-a-slug-for-seo-urls/' rel='bookmark' title='PHP function to generate a slug for SEO URLs'>PHP function to generate a slug for SEO URLs</a></li>
<li><a href='http://jessbarnes.com/2010/10/hanging-server-log-the-output-of-top-to-a-file/' rel='bookmark' title='Hanging server? Log the output of top to a file'>Hanging server? Log the output of top to a file</a></li>
<li><a href='http://jessbarnes.com/2009/12/mysql-string-escaping-in-php/' rel='bookmark' title='MySQL string escaping in PHP'>MySQL string escaping in PHP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://jessbarnes.com/2009/12/bash-alias-to-search-file-contents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

