<?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>jessejcollins.com &#187; sh</title>
	<atom:link href="http://jessejcollins.com/blog/tag/sh/feed/" rel="self" type="application/rss+xml" />
	<link>http://jessejcollins.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 22 Aug 2010 17:00:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Automated Craigslist Search with Cron</title>
		<link>http://jessejcollins.com/blog/2009/02/21/automated-craigslist-search-with-cron/</link>
		<comments>http://jessejcollins.com/blog/2009/02/21/automated-craigslist-search-with-cron/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 06:07:23 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[craigslist]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[korn shell]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[sh]]></category>

		<guid isPermaLink="false">http://jessejcollins.com/blog/?p=13</guid>
		<description><![CDATA[I was looking for a way to have an automated search for some items I&#8217;m looking for on Craigslist, but nothing exists in Craigslist to email you daily/weekly for items matching a particular string.  I found a few websites that offered this functionality via an application, but I&#8217;m not down for that.  Instead I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a way to have an automated search for some items I&#8217;m looking for on Craigslist, but nothing exists in Craigslist to email you daily/weekly for items matching a particular string.  I found a few websites that offered this functionality via an application, but I&#8217;m not down for that.  Instead I wrote this simple korn shell script.  Enjoy!</p>
<pre class="brush: bash;">
#!/bin/sh
echo &quot;--&gt; Setup...&quot;;
directory=/my/dir/for/results/;
filename=&quot;craigslist_dell_monitor.html&quot;;
path=&quot;${directory}${filename}&quot;;
website=&quot;http://mycity.craigslist.org/search/sss?query=dell+2005fpw&amp;amp;minAsk=min&amp;amp;maxAsk=max&quot;
echo &quot;--&gt; Searching for Dell Monitor...&quot;;
wget -O ${path} ${website}
ls -la ${directory}
echo &quot;--&gt; Checking for results...&quot;;
cat ${path} | grep &quot;Found:&quot;
if [ $? == 0 ]
then
echo &quot;--&gt; Sending results email...&quot;;
echo ${website} | mail -s &quot;craigslist search - Dell Monitor&quot; myemail@gmail.com
else
echo &quot;--&gt; No results.&quot;;
fi
exit;
</pre>
<p>Any guesses on what I was searching for?  <img src='http://jessejcollins.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jessejcollins.com/blog/2009/02/21/automated-craigslist-search-with-cron/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

