<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: for loop code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 04 Oct 2008 23:05:04 GMT</pubDate>
    <description>DZone Snippets: for loop code</description>
    <item>
      <title>Reads log files</title>
      <link>http://snippets.dzone.com/posts/show/4880</link>
      <description>// Map directory structure and then read logs extract results.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;!#/usr/bin/bash&lt;br /&gt;&lt;br /&gt;for line in `ls /netapp/XXXXXX0/XXXXXX_logs`&lt;br /&gt;	do &lt;br /&gt;	for line2 in `ls  /netapp/XXXXXX0/XXXXXX_logs/$line`&lt;br /&gt;			do  echo /netapp/XXXXXX0/XXXXXX_logs/$line/$line2 &lt;br /&gt;	done	&lt;br /&gt;done | grep 2007-11-29 &gt; results.dat&lt;br /&gt;&lt;br /&gt;!#/usr/bin/bash&lt;br /&gt;for res in `cat results.dat`&lt;br /&gt; do&lt;br /&gt; echo -n $res &lt;br /&gt; echo -n " "&lt;br /&gt; grep -c ",i," $res/*&lt;br /&gt;done&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 12 Dec 2007 23:38:24 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4880</guid>
      <author>aniline (Aniline)</author>
    </item>
    <item>
      <title>Unicode words from online dictionary</title>
      <link>http://snippets.dzone.com/posts/show/4708</link>
      <description>// list words from unicode dictionary &lt;br /&gt;// you need to add this line in the head section&lt;br /&gt;//   &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;for ( $i = 1; $i &lt;= 45; $i++) {&lt;br /&gt;$url="http://dsal.uchicago.edu/cgi-bin/romadict.pl?page=$i&amp;table=molesworth&amp;display=utf8";&lt;br /&gt;$text=file_get_contents($url);&lt;br /&gt;$myarray = preg_match_all('#&lt;font size="\+1"&gt;(.*?)&lt;/font&gt;#i', $text, $matches);&lt;br /&gt;echo implode(' ',$matches[1]); &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 28 Oct 2007 08:55:52 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4708</guid>
      <author>shantanuo (shantanu oak)</author>
    </item>
  </channel>
</rss>
