<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Bourne/bash shell scripts: case statement</title>
	<atom:link href="http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Sat, 21 Nov 2009 21:54:54 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: S.Raghu</title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-12436</link>
		<dc:creator>S.Raghu</dc:creator>
		<pubDate>Sat, 13 Jun 2009 05:56:41 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-12436</guid>
		<description>How to branch if the value of the variable is &#039;*&#039; ?&lt;br&gt;For eg parameters passed to a program are 2 numbers and an arithmetical operand.</description>
		<content:encoded><![CDATA[<p>How to branch if the value of the variable is &#39;*&#39; ?<br />For eg parameters passed to a program are 2 numbers and an arithmetical operand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: newbie</title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-10614</link>
		<dc:creator>newbie</dc:creator>
		<pubDate>Tue, 21 Apr 2009 02:29:40 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-10614</guid>
		<description>stdin means &quot;standard input&quot; from the keyboard (file descriptor=0)&lt;br&gt;stdout means &quot;standard output&quot; to the computer screen (file descriptor=1)&lt;br&gt;stderr means &quot;standard error&quot;; output for error messages (file descriptor=2)</description>
		<content:encoded><![CDATA[<p>stdin means &#8220;standard input&#8221; from the keyboard (file descriptor=0)<br />stdout means &#8220;standard output&#8221; to the computer screen (file descriptor=1)<br />stderr means &#8220;standard error&#8221;; output for error messages (file descriptor=2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi_Kiran</title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-6650</link>
		<dc:creator>Ravi_Kiran</dc:creator>
		<pubDate>Wed, 31 Dec 2008 06:28:39 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-6650</guid>
		<description>case &quot;$1&quot; in&lt;br&gt;  stdin&#124;&lt;br&gt;  -)&lt;br&gt;commands&lt;br&gt;;;&lt;br&gt;&lt;br&gt;What does stdin&#124;&lt;br&gt;-) mean here?&lt;br&gt;Can somebody explain it?</description>
		<content:encoded><![CDATA[<p>case &#8220;$1&#8243; in<br />  stdin|<br />  -)<br />commands<br />;;</p>
<p>What does stdin|<br />-) mean here?<br />Can somebody explain it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-2449</link>
		<dc:creator></dc:creator>
		<pubDate>Wed, 14 Dec 2005 09:06:33 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2449</guid>
		<description>It&#039;s possible to use even more complicated syntax with regular expressions:

case &quot;$1&quot; in 
     +(start&#124;run)     )        /usr/app/startup-script      ;; 
     @([Ss])top       )         /usr/app/stop-script      ;; 
esac

?(pattern1 &#124; pattern2 &#124; ... &#124; patternn)
zero or one occurrence of any pattern

*( pattern1 &#124; pattern2 &#124; ... &#124; patternn)
zero or more occurrences of any pattern

@( pattern1 &#124; pattern2 &#124; ... &#124; patternn)
exactly one occurrence of any pattern

+( pattern1 &#124; pattern2 &#124; ... &#124; patternn)
one or more occurrence of any pattern

!( pattern1 &#124; pattern2 &#124; ... &#124; patternn)
all strings except those that match any pattern</description>
		<content:encoded><![CDATA[<p>It&#8217;s possible to use even more complicated syntax with regular expressions:</p>
<p>case &#8220;$1&#8243; in<br />
     +(start|run)     )        /usr/app/startup-script      ;;<br />
     @([Ss])top       )         /usr/app/stop-script      ;;<br />
esac</p>
<p>?(pattern1 | pattern2 | &#8230; | patternn)<br />
zero or one occurrence of any pattern</p>
<p>*( pattern1 | pattern2 | &#8230; | patternn)<br />
zero or more occurrences of any pattern</p>
<p>@( pattern1 | pattern2 | &#8230; | patternn)<br />
exactly one occurrence of any pattern</p>
<p>+( pattern1 | pattern2 | &#8230; | patternn)<br />
one or more occurrence of any pattern</p>
<p>!( pattern1 | pattern2 | &#8230; | patternn)<br />
all strings except those that match any pattern</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matir</title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-2039</link>
		<dc:creator>Matir</dc:creator>
		<pubDate>Wed, 29 Jun 2005 12:40:45 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2039</guid>
		<description>Actually, that should be &#039;*)&#039;.  If you look, it&#039;s trying to give syntax for errors.  restart would read like: &lt;code&gt;&#039;restart&#039;&#41;
    $0 stop
    $1 start
    ;;&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p>Actually, that should be &#8216;*)&#8217;.  If you look, it&#8217;s trying to give syntax for errors.  restart would read like: <code>'restart'&#41;<br />
    $0 stop<br />
    $1 start<br />
    ;;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: for great restart</title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-1965</link>
		<dc:creator>for great restart</dc:creator>
		<pubDate>Mon, 13 Jun 2005 14:48:07 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1965</guid>
		<description>there is an error in the second example

&lt;code&gt;
case &quot;$1&quot; in
     &#039;start&#039;&#41;
         /usr/app/startup-script
         ;;
     &#039;stop&#039;&#41;
         /usr/app/shutdown-script
         ;;
 --&gt; &#039;start&#039;&#41; &lt;-- here error, should be restart
         echo &quot;Usage&#58; $0 &#91;start&#124;stop&#93;&quot;
         ;;
esac
&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p>there is an error in the second example</p>
<p><code><br />
case &quot;$1&quot; in<br />
     'start'&#41;<br />
         /usr/app/startup-script<br />
         ;;<br />
     'stop'&#41;<br />
         /usr/app/shutdown-script<br />
         ;;<br />
 --&gt; 'start'&#41; &lt;-- here error, should be restart<br />
         echo &quot;Usage&#58; $0 &#91;start|stop&#93;&quot;<br />
         ;;<br />
esac<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hpx</title>
		<link>http://www.tech-recipes.com/rx/212/bourne_bash_shell_scripts_case_statement/comment-page-1/#comment-1946</link>
		<dc:creator>hpx</dc:creator>
		<pubDate>Wed, 08 Jun 2005 03:02:21 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1946</guid>
		<description>:lol: 
good job!</description>
		<content:encoded><![CDATA[<p>:lol:<br />
good job!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
