<?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>OpenPeta &#187; BASH Shell Scripts</title>
	<atom:link href="http://openpeta.com/index.php/category/bash-shell-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://openpeta.com</link>
	<description>Open Mind ....  Open Source ...</description>
	<lastBuildDate>Wed, 21 Jul 2010 03:20:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BASH Script for copying files recursively form one directory to another</title>
		<link>http://openpeta.com/index.php/2008/07/bash-script-for-copying-files-recursively-form-one-directory-to-another/</link>
		<comments>http://openpeta.com/index.php/2008/07/bash-script-for-copying-files-recursively-form-one-directory-to-another/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 06:03:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2008/07/19/bash-script-for-copying-files-recursively-form-one-directory-to-another/</guid>
		<description><![CDATA[#!/bin/bash &#160; # Author : Antony # Date : 19/07/2008 # Description : Script for copying files recursively form one directory to another &#160; # Get Source and Destination Directory Paths echo &#34;Enter the source path&#34; read src echo &#34;Enter the Destination path&#34; read dest &#160; for file in `find $src -name &#34;*.*&#34;` do echo [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Author : Antony</span>
<span style="color: #666666; font-style: italic;"># Date   : 19/07/2008</span>
<span style="color: #666666; font-style: italic;"># Description : Script for copying files recursively form one directory to another</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Get Source and Destination Directory Paths</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enter the source path&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> src
<span style="color: #7a0874; font-weight: bold;">echo</span>  <span style="color: #ff0000;">&quot;Enter the Destination path&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> dest
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #007800;">$src</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.*&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$file</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #007800;">$file</span> <span style="color: #007800;">$dest</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2008/07/bash-script-for-copying-files-recursively-form-one-directory-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Script &#8211; Swapping Two Values</title>
		<link>http://openpeta.com/index.php/2007/10/bash-script-swapping-two-values/</link>
		<comments>http://openpeta.com/index.php/2007/10/bash-script-swapping-two-values/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 12:39:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/10/08/bash-script-swapping-two-values/</guid>
		<description><![CDATA[#!/bin/bash # Author : A.Antony # Date : 08/10/2007 &#160; echo &#34;Enter First Value(a) : &#34; read a echo &#34;Enter Second Value (b): &#34; read b echo &#34;Before swap, a = $a and y = $b&#34; c=$a a=$b b=$c echo &#34;After swap, a = $a and b = $b&#34;]]></description>
			<content:encoded><![CDATA[
<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: #666666; font-style: italic;"># Author : A.Antony</span>
<span style="color: #666666; font-style: italic;"># Date : 08/10/2007</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enter First Value(a) : &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> a
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enter Second Value (b): &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> b
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Before swap, a = <span style="color: #007800;">$a</span> and y = <span style="color: #007800;">$b</span>&quot;</span>
<span style="color: #007800;">c</span>=<span style="color: #007800;">$a</span>
<span style="color: #007800;">a</span>=<span style="color: #007800;">$b</span>
<span style="color: #007800;">b</span>=<span style="color: #007800;">$c</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;After swap, a = <span style="color: #007800;">$a</span> and b = <span style="color: #007800;">$b</span>&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/10/bash-script-swapping-two-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Script &#8211; Arithmetic Manipulations</title>
		<link>http://openpeta.com/index.php/2007/10/bash-script-arithmetic-manipulations/</link>
		<comments>http://openpeta.com/index.php/2007/10/bash-script-arithmetic-manipulations/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 09:48:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/10/05/bash-script-arithmetic-manipulations/</guid>
		<description><![CDATA[Three options are used for arithmatic manipulations 1) expr 2) bc 3) (( )) Example #Program for Arithmetic Operations #!/bin/bash #Author : Antony #Date : 05/10/2007 &#160; echo &#34;Enter the first Number &#34; read x echo &#34;Enter the second Number &#34; read y #Method 1 add=&#60;span style=&#34;font-weight: bold; font-style: italic;&#34;&#62;$&#40;&#40; $x + $y &#41;&#41;&#60;/span&#62; echo [...]]]></description>
			<content:encoded><![CDATA[<p>Three options are used for arithmatic manipulations<br />
1) expr<br />
2) bc<br />
3) (( ))</p>
<p><span style="font-style: italic;">Example</span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#Program for Arithmetic Operations</span>
<span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#Author : Antony</span>
<span style="color: #666666; font-style: italic;">#Date : 05/10/2007</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enter the first Number &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> x
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enter the second Number &quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> y
<span style="color: #666666; font-style: italic;">#Method 1</span>
<span style="color: #007800;">add</span>=<span style="color: #000000; font-weight: bold;">&lt;</span>span <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;font-weight: bold; font-style: italic;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #007800;">$x</span> + <span style="color: #007800;">$y</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;">&lt;/</span>span<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The Addition is <span style="color: #007800;">$add</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Method 2</span>
<span style="color: #007800;">sub</span>=<span style="color: #000000; font-weight: bold;">&lt;</span>span <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;font-weight: bold; font-style: italic;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;`</span><span style="color: #c20cb9; font-weight: bold;">expr</span> <span style="color: #007800;">$x</span> - <span style="color: #007800;">$y</span><span style="color: #000000; font-weight: bold;">`&lt;/</span>span<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The Subtraction is <span style="color: #007800;">$sub</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Method 3</span>
<span style="color: #007800;">div</span>=<span style="color: #000000; font-weight: bold;">&lt;</span>span <span style="color: #007800;">style</span>=<span style="color: #ff0000;">&quot;font-weight: bold; font-style: italic;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;scale=4; <span style="color: #007800;">$x</span> / <span style="color: #007800;">$y</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">bc</span><span style="color: #000000; font-weight: bold;">`&lt;/</span>span<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The Divison is <span style="color: #007800;">$div</span>&quot;</span></pre></div></div>

<p><span style="font-style: italic;">Output of this program</span></p>
<p>VIT:/home/antony# sh arith.sh<br />
Enter the first Number<br />
123<br />
Enter the second Number<br />
124<br />
The Addition is 247<br />
The Subtraction is -1<br />
The Divison is .9919<br />
VIT:/home/antony#</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/10/bash-script-arithmetic-manipulations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Script : Displaying Text in BOLD format</title>
		<link>http://openpeta.com/index.php/2007/10/bash-script-displaying-text-in-bold-format/</link>
		<comments>http://openpeta.com/index.php/2007/10/bash-script-displaying-text-in-bold-format/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 08:47:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/10/05/bash-script-displaying-text-in-bold-format/</guid>
		<description><![CDATA[#!/bin/bash#Author : Antony#Date : 05/10/2007 echo &#8220;Enter the text &#8220;read texttput boldecho $texttput reset Output of this ProgramEnter the text Antony Antony]]></description>
			<content:encoded><![CDATA[<p>#!/bin/bash<br />#Author : Antony<br />#Date : 05/10/2007</p>
<p>echo &#8220;Enter the text &#8220;<br />read text<br />tput bold<br />echo $text<br />tput reset</p>
<p>Output of this Program<br /><span style="font-style: italic;">Enter the text</p>
<p></span><span style="font-style: italic;">Antony</p>
<p></span><span style="font-weight: bold; font-style: italic;">Antony</span></p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/10/bash-script-displaying-text-in-bold-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Scripts &#8211; Program for &#039;while&#039; loop</title>
		<link>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-while-loop/</link>
		<comments>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-while-loop/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 03:25:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/09/26/bash-scripts-program-for-while-loop/</guid>
		<description><![CDATA[#Program for &#8216;while&#8217; loop# Author : Antony# Last date of modification : 29/07/2007#Syntax# while [ condition ]# do# statement# done x=1while [ ! $x -ge 5 ]doecho $xx=`echo &#8220;$x+1&#8243; &#124; bc`done y=1until [ $y -ge 5 ]doecho $yy=`echo &#8220;$y+1&#8243; &#124; bc`done]]></description>
			<content:encoded><![CDATA[<p>#Program for &#8216;while&#8217; loop<br />#       Author : Antony<br />#       Last date of modification : 29/07/2007<br />#Syntax<br />#    while [ condition ]<br />#       do<br />#          statement<br />#       done</p>
<p>x=1<br />while [ ! $x -ge 5 ]<br />do<br />echo $x<br />x=`echo &#8220;$x+1&#8243; | bc`<br />done</p>
<p>y=1<br />until  [ $y -ge 5 ]<br />do<br />echo $y<br />y=`echo &#8220;$y+1&#8243; | bc`<br />done</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-while-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Scripts &#8211; Program for &#039;case&#039; statement</title>
		<link>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-case-statement/</link>
		<comments>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-case-statement/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 13:45:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/09/25/bash-scripts-program-for-case-statement/</guid>
		<description><![CDATA[#Program for &#8216;case&#8217; statement# Author : Antony# Last date of modification : 29/07/2007#Syntax# case word in# pattern1)# list1 ; ;# pattern2)# list2 ; ;# esac #Simple Exampleecho &#8220;Select the Option&#8221;echo &#8220;1.Terminal&#8221;echo &#8220;2.Firefox&#8221;echo &#8220;3.Text editor&#8221; read name case $name in 1) echo &#8220;Terminal is running&#8230;&#8221; echo &#8220;`xterm`&#8221; ;; 2) echo &#8220;Firefox is running&#8230;&#8221; echo &#8220;`firefox`&#8221; ;; [...]]]></description>
			<content:encoded><![CDATA[<p>#Program for &#8216;case&#8217; statement<br />#    Author : Antony<br />#    Last date of modification : 29/07/2007<br />#Syntax<br />#    case word in<br />#        pattern1)<br />#           list1 ; ;<br />#        pattern2)<br />#           list2 ; ;<br />#    esac</p>
<p>#Simple Example<br />echo &#8220;Select the Option&#8221;<br />echo &#8220;1.Terminal&#8221;<br />echo &#8220;2.Firefox&#8221;<br />echo &#8220;3.Text editor&#8221;</p>
<p>read name</p>
<p>case $name in<br />  1) echo &#8220;Terminal is running&#8230;&#8221;<br />     echo &#8220;`xterm`&#8221; ;;<br />  2) echo &#8220;Firefox is running&#8230;&#8221;<br />     echo &#8220;`firefox`&#8221; ;;<br />  3) echo &#8220;Text editor has been opened &#8230;&#8221;<br />     echo &#8220;`gedit`&#8221;   ;;<br />esac</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-case-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Scripts &#8211; Displaying output using echo</title>
		<link>http://openpeta.com/index.php/2007/09/bash-scripts-displaying-output-using-echo/</link>
		<comments>http://openpeta.com/index.php/2007/09/bash-scripts-displaying-output-using-echo/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 13:43:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/09/25/bash-scripts-displaying-output-using-echo/</guid>
		<description><![CDATA[#Displaying Various Output Formats# Author :Antony# Last Date of Modification :27/07/2007 #Three Types of quotes are# 1.Single quote# 2.Double quote# 3.Backslash #Examples echo &#8220;Current Date is `date`&#8221; echo This \&#8217;song\&#8217; is so nice echo The Movie \&#8221;Gladiator\&#8221; won 7 oscar awardsecho &#8216;The total amount is $10000&#8242; echo &#8220;The total amount is \$1000&#8243; echo &#8220;Wow! This [...]]]></description>
			<content:encoded><![CDATA[<p>#Displaying Various Output Formats<br />#    Author :Antony<br />#    Last Date of Modification :27/07/2007</p>
<p>#Three Types of quotes are<br />#    1.Single quote<br />#    2.Double quote<br />#    3.Backslash</p>
<p>#Examples</p>
<p>echo &#8220;Current Date is `date`&#8221;</p>
<p>echo This \&#8217;song\&#8217; is so nice</p>
<p>echo  The Movie \&#8221;Gladiator\&#8221; won 7 oscar awards<br />echo &#8216;The total amount is $10000&#8242;</p>
<p>echo &#8220;The total amount is \$1000&#8243;</p>
<p>echo &#8220;Wow! This is so beautiful&#8230;&#8221;</p>
<p>echo Hello Ram\; How are you?</p>
<p>#Output of this program<br />#    Current Date is Fri Jul 27 07:00:58 IST 2007<br />#    This &#8216;song&#8217; is so nice<br />#    The Movie &#8220;Gladiator&#8221; won 7 oscar awards<br />#    The total amount is $10000<br />#    The total amount is $1000<br />#    Wow! This is so beautiful&#8230;<br />#    Hello Ram; How are you?</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/09/bash-scripts-displaying-output-using-echo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH Scripts &#8211; Program for Environment Variables</title>
		<link>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-environment-variables/</link>
		<comments>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-environment-variables/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 13:42:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/09/25/bash-scripts-program-for-environment-variables/</guid>
		<description><![CDATA[#Use of Environment Variables# Author:Antony# Last Modification Date :27/07/2007 #Indicates the Current working directoryecho &#8220;The Current Working directory is $PWD&#8221; # Display User IDecho &#8220;Current User ID is $UID&#8221; #Generating random integers between 1 and 32767echo &#8220;The random number is $RANDOM&#8221; #Information about pathecho &#8220;The Path details&#8221;echo $PATH #Home Directory informationecho &#8220;Your Home directory is [...]]]></description>
			<content:encoded><![CDATA[<p>#Use of Environment Variables<br />#    Author:Antony<br />#    Last Modification Date  :27/07/2007</p>
<p>#Indicates the Current working directory<br />echo &#8220;The Current Working directory is $PWD&#8221;</p>
<p># Display User ID<br />echo &#8220;Current User ID is $UID&#8221;</p>
<p>#Generating random integers between 1 and 32767<br />echo &#8220;The random number is $RANDOM&#8221;</p>
<p>#Information about path<br />echo &#8220;The Path details&#8221;<br />echo $PATH</p>
<p>#Home Directory information<br />echo &#8220;Your Home directory is $HOME&#8221;</p>
<p>#Output of this program</p>
<p>#    [rooot@netadmin /]# sh envvardemo3.sh<br />#    The Current Working directory is /<br />#    Current User ID is 0<br />#    The random number is 28804<br />#    The Path details<br />#    /usr/java/jdk1.6.0/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/java/jdk1.6.0/bin:<br />#    /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin<br />#    Your Home directory is /root</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/09/bash-scripts-program-for-environment-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Script Basics &#8211; Program for variables</title>
		<link>http://openpeta.com/index.php/2007/09/shell-script-basics-program-for-variables/</link>
		<comments>http://openpeta.com/index.php/2007/09/shell-script-basics-program-for-variables/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 13:38:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/09/25/shell-script-basics-program-for-variables/</guid>
		<description><![CDATA[#Program for variables# Author:Antony# Last Date of Modification :27/07/2007#Variable name can contain # a-z / A-Z # 0-9 # &#8211; (underscore)# can start with only _ or a-z/A-Z #Two types of variables # 1. Scalar variables/name value pairs # 2. Array Variables # 1.Scalar variables var=&#8221;This is the Demo Program for Variables&#8221; #To diplay the [...]]]></description>
			<content:encoded><![CDATA[<p>#Program for variables<br />#    Author:Antony<br />#    Last Date of Modification :27/07/2007<br />#Variable name can contain<br /> # a-z / A-Z<br /> # 0-9<br /> # &#8211; (underscore)<br /># can start with only _ or a-z/A-Z</p>
<p>#Two types of variables<br /> # 1. Scalar variables/name value pairs<br /> # 2. Array Variables</p>
<p># 1.Scalar variables<br /> var=&#8221;This is the Demo Program for Variables&#8221;</p>
<p>#To diplay the variable content<br />#prefix variable name with $ symbol and use echo</p>
<p> echo $var</p>
<p># 2.Array Variables<br />  # The Syntax is<br />  #        name[index]=value<br />  #               or<br />  #        name=(value1 value2 &#8230;value1)</p>
<p> devices=&#8221;cpu&#8221;<br /> devices[1]=&#8221;keyboard&#8221;<br /> devices[2]=&#8221;mouse&#8221;<br /> devices[3]=&#8221;monitor&#8221;</p>
<p> subjects=(&#8220;database&#8221; &#8220;image processing&#8221; &#8220;java&#8221; &#8220;Netwotk Security&#8221;)</p>
<p> echo &#8220;The Second element of Device array is ${devices[1]}&#8221;</p>
<p>#To display or access the values of an array<br /> # ${name[*]}<br /> # ${name[@]}<br /> echo &#8220;The Values of devices array&#8221;<br /> echo ${devices[*]}<br /> echo &#8220;The Values of subjects array&#8221;<br /> echo ${subjects[*]}</p>
<p>#Creating Constants or readonly variables<br /> PI=3.14285<br /> readonly PI<br /> # You cant change the value of PI<br /> echo &#8220;The Value of Constant PI is $PI&#8221;</p>
<p>#Unsetting the Variable<br /> unset devices<br /> unset var<br /> unset subjects<br /> echo $var</p>
<p>#Output of this program</p>
<p>#    This is the Demo Program for Variables<br />#    The Second element of Device array is keyboard<br />#    The Values of devices array<br />#    cpu keyboard mouse monitor<br />#    The Values of subjects array<br />#    database image processing java Netwotk Security<br />#    The Value of Constant PI is 3.14285<br />#</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/09/shell-script-basics-program-for-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hoe to run shell script in Linux terminal</title>
		<link>http://openpeta.com/index.php/2007/09/hoe-to-run-shell-script-in-linux-terminal/</link>
		<comments>http://openpeta.com/index.php/2007/09/hoe-to-run-shell-script-in-linux-terminal/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 13:24:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BASH Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.openpeta.com/2007/09/25/hoe-to-run-shell-script-in-linux-terminal/</guid>
		<description><![CDATA[Shell Scripting is one of the powerful tool for administrator . few types of shell are available in Linux OS (like sh, csh, tcsh, ksh,BASH) .Bash is the default shell for all Linux ox . For Creating Shell programs# vi filename.sh For Running Shell Programs# sh filename.sh or# chmod 744 filename.sh#./filename.sh]]></description>
			<content:encoded><![CDATA[<p>Shell Scripting is one of the powerful tool for administrator . few types of shell are available in Linux OS (like sh, csh, tcsh, ksh,BASH) .Bash is the default shell for all Linux ox .</p>
<p>For Creating  Shell programs<br /># vi filename.sh</p>
<p>For Running Shell Programs<br /># sh filename.sh<br />    or<br /># chmod 744 filename.sh<br />#./filename.sh</p>
]]></content:encoded>
			<wfw:commentRss>http://openpeta.com/index.php/2007/09/hoe-to-run-shell-script-in-linux-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
