<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: gnu code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 24 Jul 2008 23:17:16 GMT</pubDate>
    <description>DZone Snippets: gnu code</description>
    <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>
    <item>
      <title>Find all large files on a Linux machine</title>
      <link>http://snippets.dzone.com/posts/show/1491</link>
      <description>Finds all files over 20,000KB (roughly 20MB) in size and presents their names and size in a human readable format:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' &lt;/code&gt;</description>
      <pubDate>Wed, 15 Feb 2006 20:13:21 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1491</guid>
      <author>peter (Peter Cooperx)</author>
    </item>
  </channel>
</rss>
