<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: shellscript code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 07:04:42 GMT</pubDate>
    <description>DZone Snippets: shellscript code</description>
    <item>
      <title>Shell script to make lists of certain file types in a web site file system</title>
      <link>http://snippets.dzone.com/posts/show/5564</link>
      <description>mkdir file_lists&lt;br /&gt;find . -name '*.pdf' -o -name '*.PDF' &gt; ./file_lists/all_pdf_files.txt &lt;br /&gt;find . -name '*.pdf' -o -name '*.PDF' -mtime +365 &gt; ./file_lists/pdf_files_mtime_gt_1yr.txt&lt;br /&gt;&lt;br /&gt;find . -name '*.jpg' -o -name '*.JPG' -o -name '*.gif'  -o -name '*.GIF' -o -name '*.png' -o -name '*.PNG' &gt; ./file_lists/all_image_files.txt &lt;br /&gt;&lt;br /&gt;find . -name '*.log' -o -name '*.LOG' &gt; ./file_lists/all_log_files.txt&lt;br /&gt;&lt;br /&gt;find . -name '*.css' -o -name '*.CSS' -o -name '*.js'  -o -name '*.JS' &gt; ./file_lists/all_design_assets_files.txt &lt;br /&gt;&lt;br /&gt;find . -name '*.ram' -o -name '*.RAM' -o -name '*.aif'  -o -name '*.AIF' -o -name '*.mp3' -o -name '*.MP3' &gt; ./file_lists/all_audio_files.txt&lt;br /&gt;find . -name '*.ram' -o -name '*.RAM' -o -name '*.aif'  -o -name '*.AIF' -o -name '*.mp3' -o -name '*.MP3' -mtime +365 &gt; ./file_lists/audio_files_mtime_gt_1yr.txt &lt;br /&gt;&lt;br /&gt;find . -name '*.html' -o -name '*.HTML' -o -name '*.htm'  -o -name '*.HTM' &gt; ./file_lists/all_html_files.txt &lt;br /&gt;find . -name '*.html' -o -name '*.HTML' -o -name '*.htm'  -o -name '*.HTM' -mtime +365 &gt; ./file_lists/html_files_mtime_gt_1yr.txt</description>
      <pubDate>Sat, 31 May 2008 20:00:15 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5564</guid>
      <author>johnloy (John Loy)</author>
    </item>
    <item>
      <title>Morse decode using sed</title>
      <link>http://snippets.dzone.com/posts/show/5144</link>
      <description>This is a short &lt;a href="http://en.wikipedia.org/wiki/Morse_code"&gt;Morse code&lt;/a&gt; decoder written as a shellscript using &lt;a href="http://en.wikipedia.org/wiki/Sed"&gt;sed&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Morse coded text should be in $text, and should be written with spaces between the letters.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;echo $text\  | tr . 0 | sed -e {s/0----\ /1/g} -e {s/00---\ /2/g} -e {s/000--\ /3/g} -e {s/000-\ /4/g} -e {s/00000\ /5/g} -e {s/-0000\ /6/g} -e {s/--000\ /7/g} -e {s/---00\ /8/g} -e {s/----0\ /9/g} -e {s/-----\ /0/g} \&lt;br /&gt;	| sed -e {s/-0-0\ /c/g} -e {s/-000\ /b/g} -e {s/00-0\ /f/g} -e {s/0000\ /h/g} -e {s/0---\ /j/g} -e {s/0-00\ /l/g} -e {s/0--0\ /p/g} -e {s/--0-\ /q/g} -e {s/000-\ /v/g} -e {s/-00-\ /x/g} -e {s/-0--\ /y/g} -e {s/--00\ /z/g} \&lt;br /&gt;	| sed -e {s/0--\ /w/g} -e {s/-00\ /d/g} -e {s/--0\ /g/g} -e {s/-0-\ /k/g} -e {s/---\ /o/g} -e {s/0-0\ /r/g} -e {s/000\ /s/g} -e {s/00-\ /u/g} \&lt;br /&gt;	| sed -e {s/0-\ /a/g} -e {s/00\ /i/g} -e {s/--\ /m/g} -e {s/-0\ /n/g} \&lt;br /&gt;	| sed -e {s/0\ /e/g} -e {s/-\ /t/g}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 15 Feb 2008 13:54:22 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5144</guid>
      <author>scvalex (Alexandru Scvortov)</author>
    </item>
  </channel>
</rss>
