<?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>Matt [Danger] &#187; Shell Scripting</title>
	<atom:link href="http://mattdanger.net/category/shell-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattdanger.net</link>
	<description>One step closer to world domination</description>
	<lastBuildDate>Fri, 02 Dec 2011 18:20:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dealing with ._ files in Mac OS X</title>
		<link>http://mattdanger.net/2010/01/dealing-with-_-files-in-mac-os-x/</link>
		<comments>http://mattdanger.net/2010/01/dealing-with-_-files-in-mac-os-x/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 01:09:53 +0000</pubDate>
		<dc:creator>Matt Danger</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[._]]></category>

		<guid isPermaLink="false">http://mattdanger.net/?p=270</guid>
		<description><![CDATA[The current code base I&#8217;m working from is located on a network share and controlled by Subversion. I&#8217;ve been dealing with the Apple Double format problem a lot lately and scripted a simple clean up solution. For those unfamiliar with the Apple Double problem, it is an old bug that exists from the early days&#8230;]]></description>
			<content:encoded><![CDATA[<p>The current code base I&#8217;m working from is located on a network share and controlled by Subversion. I&#8217;ve been dealing with the <a href="http://support.apple.com/kb/TA20578">Apple Double format problem</a> a lot lately and scripted a simple clean up solution.</p>
<p>For those unfamiliar with the Apple Double problem, it is an old bug that exists from the early days of Mac OS X. Here&#8217;s the explanation from the Apple Knowledge Base:</p>
<blockquote><p>Before Mac OS X, the Mac OS used &#8216;forked&#8217; files, which have two components: a data fork and a resource fork. The Mac OS Standard (HFS) and Mac OS Extended (HFS Plus) disk formats support forked files. When you move these types of files to other disk formats, the resource fork can be lost.</p>
<p>With Mac OS X, there is a mechanism called &#8220;Apple Double&#8221; that allows the system to work with disk formats that do not have a forked file feature, such as remote NFS, SMB, WebDAV directories, or local UFS volumes. Apple Double does this by converting the file into two separate files. The first new file keeps the original name and contains the data fork of the original file. The second new file has the name of the original file prefixed by a &#8220;._ &#8221; and contains the resource fork of the original file. If you see both files, the ._ file can be safely ignored. Sometimes when deleting a file, the ._ component will not be deleted. If this occurs you can safely delete the ._ file.</p></blockquote>
<p>Essentially, when you&#8217;re working on files located on a network share you end up with duplicates of the file with a &#8220;._&#8221; prefix. The files are empty and are quite the annoyance. They are removed when the network share is unmounted. However, I leave my share mounted for long periods of time and the files make a mess of my Subversion status reports.</p>
<p>You can run the following command to clean the files up. </p>
<p><code>find . -name '._*' -exec rm '{}' ';'</code></p>
<p>You could also make this into a launchctl or cron task. Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://mattdanger.net/2010/01/dealing-with-_-files-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook-Status-2.0 announced!</title>
		<link>http://mattdanger.net/2009/02/facebook-status-20-announced/</link>
		<comments>http://mattdanger.net/2009/02/facebook-status-20-announced/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 18:33:01 +0000</pubDate>
		<dc:creator>Matt Danger</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://mattdanger.net/?p=155</guid>
		<description><![CDATA[I have updated my original Facebook status script to work with Facebook 2.0. Why is this interesting? Until recently the Facebook Developer Platform didn&#8217;t allow the changing of user status messages. This does and can be implemented in other utilities, which I may do in the future. Enjoy!]]></description>
			<content:encoded><![CDATA[<p>I have <a href="http://mattdanger.net/2008/11/update-your-facebook-status-from-the-command-line/">updated my original Facebook status script</a> to work with Facebook 2.0.</p>
<p>Why is this interesting? Until <a href="http://www.allfacebook.com/2009/02/facebook-opens-status-api-say-goodbye-to-twitter/">recently</a> the Facebook Developer Platform didn&#8217;t allow the changing of user status messages. This does and can be implemented in other utilities, which I may do in the future. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://mattdanger.net/2009/02/facebook-status-20-announced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Examples</title>
		<link>http://mattdanger.net/2008/11/bash-examples/</link>
		<comments>http://mattdanger.net/2008/11/bash-examples/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 23:35:14 +0000</pubDate>
		<dc:creator>Matt Danger</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Bash]]></category>

		<guid isPermaLink="false">http://mattdanger.net/?p=8</guid>
		<description><![CDATA[A while ago a friend was taking an entry level Unix programming class and asked me to help him study. I came up with some sample problems for him. Here are my solutions: The first is a program that will allow a user to input as many numbers as the user wants (999 as the&#8230;]]></description>
			<content:encoded><![CDATA[<p>A while ago a friend was taking an entry level Unix programming class and asked me to help him study. I came up with some sample problems for him. Here are my solutions:</p>
<p>The first is a program that will allow a user to input as many numbers as the user wants (999 as the choice that ends the user input). The program will then output the highest number, the lowest number, the sum of all the numbers, and the average number.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #007800;">COUNT</span>=<span style="color: #000000;">0</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Enter a number (999 to quit): &quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> NUM; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #666666; font-style: italic;"># Set initials</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$COUNT</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">HIGHEST</span>=<span style="color: #007800;">$NUM</span>
    <span style="color: #007800;">LOWEST</span>=<span style="color: #007800;">$NUM</span>
    <span style="color: #007800;">SUM</span>=<span style="color: #007800;">$NUM</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># If 999 is entered, break out</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$NUM</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">999</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">break</span>
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #666666; font-style: italic;"># See if inputted number is the highest number</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$NUM</span> <span style="color: #660033;">-gt</span> <span style="color: #007800;">$HIGHEST</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #007800;">HIGHEST</span>=<span style="color: #007800;">$NUM</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># See if inputted number is the lowest number</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$NUM</span> <span style="color: #660033;">-lt</span> <span style="color: #007800;">$LOWEST</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #007800;">LOWEST</span>=<span style="color: #007800;">$NUM</span>;
    <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Calculate sum</span>
    <span style="color: #007800;">SUM</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$SUM</span>+<span style="color: #007800;">$NUM</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Enter another number (999 to quit): &quot;</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
  <span style="color: #007800;">COUNT</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$COUNT</span>+<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #007800;">AVERAGE</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$SUM</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$COUNT</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Highest number: <span style="color: #007800;">$HIGHEST</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Lowest number: <span style="color: #007800;">$LOWEST</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Sum of the numbers: <span style="color: #007800;">$SUM</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Average of the numbers: <span style="color: #007800;">$AVERAGE</span>&quot;</span></pre></div></div>

<p>The second program is a number guessing game. The computer picks a number from 0-60 then allows the user to guess at the number until the user gets it right. The program gives the user a hint on whether they should guess a higher or lower number.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash </span>
<span style="color: #007800;">RAN</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>RANDOM<span style="color: #000000; font-weight: bold;">%</span>60<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">COUNTER</span>=<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;I've guessed a number between 0-60, what is it? &quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> GUESS; <span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$GUESS</span> <span style="color: #660033;">-eq</span> <span style="color: #007800;">$RAN</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">break</span>;
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$GUESS</span> <span style="color: #660033;">-lt</span> <span style="color: #007800;">$RAN</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Nope, try a higher number: &quot;</span>
    <span style="color: #000000; font-weight: bold;">else</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Nope, try a lower number: &quot;</span>
    <span style="color: #000000; font-weight: bold;">fi</span>	
  <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #007800;">COUNTER</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>COUNTER+<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Yep, good job! It took you <span style="color: #007800;">$COUNTER</span> tries to guess correctly.&quot;</span></pre></div></div>

<p>The third program allows a user to type in a number, then the program will either count up to the number provided by the user or count down from that number. In addition, a menu lets the user choose which counter they wish to use. In both cases that counter will either count down to 0, or start counting from 0.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash </span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Enter a number: &quot;</span>; <span style="color: #c20cb9; font-weight: bold;">read</span> NUM
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Enter U to count up to <span style="color: #007800;">$NUM</span> and D to count down to 0: &quot;</span>; <span style="color: #c20cb9; font-weight: bold;">read</span> CHOICE
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$CHOICE</span> <span style="color: #000000; font-weight: bold;">in</span>
  <span style="color: #ff0000;">'u'</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #ff0000;">'U'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> 
    <span style="color: #007800;">COUNTER</span>=<span style="color: #000000;">0</span>
    <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$COUNTER</span> <span style="color: #660033;">-le</span> <span style="color: #007800;">$NUM</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$COUNTER</span>
      <span style="color: #007800;">COUNTER</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$COUNTER</span>+<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #ff0000;">'d'</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #ff0000;">'D'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$NUM</span> <span style="color: #660033;">-ge</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span>
      <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$NUM</span>;
      <span style="color: #007800;">NUM</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$NUM</span>-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error: You entered an invalid argument.&quot;</span>
<span style="color: #000000; font-weight: bold;">esac</span></pre></div></div>

<p>The last program asks the user if they want to add, subtract, multiply or divide two user inputted numbers. Then the program outputs the sum of number 1 and number 2, the difference of number 1 and number 2, the product of number 1 and number 2, and the quotient of number 1 and number 2</p>
<p>This program will run until the user wants to quit. Also, if the user puts in a 0 as the second number, we let the user know that if they choose divide that a division by zero error will occur.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span>; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Please enter two numbers (type 'q' to quit): &quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Number 1: &quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">read</span> NUM1
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$NUM1</span> == <span style="color: #ff0000;">&quot;q&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">exit</span>; <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Number 2: &quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">read</span> NUM2
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Enter (a) to add, (s) to subtract, (m) to multiply, or (d) to divide these numbers: &quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">read</span> OPERATION
&nbsp;
  <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$OPERATION</span> <span style="color: #000000; font-weight: bold;">in</span>
    a<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The sum of <span style="color: #007800;">$NUM1</span> and <span style="color: #007800;">$NUM2</span> is: <span style="color: #007800;">$(($NUM1+$NUM2)</span>)&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span>
    s<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The difference of <span style="color: #007800;">$NUM1</span> and <span style="color: #007800;">$NUM2</span> is: <span style="color: #007800;">$(($NUM1-$NUM2)</span>)&quot;</span><span style="color: #000000; font-weight: bold;">;;</span>
    m<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The product of <span style="color: #007800;">$NUM1</span> and <span style="color: #007800;">$NUM2</span> is: <span style="color: #007800;">$(($NUM1*$NUM2)</span>)&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span>
    d<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$NUM2</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You can't divide by 0, a division by zero error will occur.&quot;</span>
      <span style="color: #000000; font-weight: bold;">else</span> 			
	    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The quotient of <span style="color: #007800;">$NUM1</span> and <span style="color: #007800;">$NUM2</span> is: <span style="color: #007800;">$(($NUM1/$NUM2)</span>)&quot;</span>
      <span style="color: #000000; font-weight: bold;">fi</span> <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://mattdanger.net/2008/11/bash-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

