<?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>Linux with examples &#187; Shell Scripting</title>
	<atom:link href="http://smartproteam.com/category/shell-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://smartproteam.com</link>
	<description></description>
	<lastBuildDate>Wed, 26 May 2010 16:22:23 +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>Shell script to enable Remote desktop on ubuntu</title>
		<link>http://smartproteam.com/shell-script-to-enable-remote-desktop-on-ubuntu/</link>
		<comments>http://smartproteam.com/shell-script-to-enable-remote-desktop-on-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 17:15:17 +0000</pubDate>
		<dc:creator>Smart</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[command to enable remote desktop]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[ubuntu remote desktop]]></category>

		<guid isPermaLink="false">http://smartproteam.com/?p=1015</guid>
		<description><![CDATA[To enable remote desktop on ubuntu below is the script
#!/bin/sh
#author : admin@smartproteam.com
#copy rights@smartproteam 2009
#script to enable remote desktop with password

#to enable the remote connection
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled  true
#to enable password protect

gconftool-2 &#8211;type list &#8211;list-type string &#8211;set /desktop/gnome/remote_access/authentication_methods &#8216;[vnc]&#8216;
#In my case i have used the password &#8220;test1234&#8243; ,if want you ...]]></description>
			<content:encoded><![CDATA[<p>To enable remote desktop on ubuntu below is the script<br />
<strong>#!/bin/sh</strong></p>
<p><strong>#<em>author : admin@smartproteam.com<br />
#copy rights@smartproteam 2009<br />
#script to enable remote desktop with password<br />
</em></strong></p>
<p><em>#to enable the remote connection</em><strong><br />
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled  true</strong></p>
<p><em>#to enable password protect</em><strong><br />
</strong></p>
<p><strong>gconftool-2 &#8211;type list &#8211;list-type string &#8211;set /desktop/gnome/remote_access/authentication_methods &#8216;[vnc]&#8216;</strong></p>
<p><em>#In my case i have used the password &#8220;test1234&#8243; ,if want you can change it </em><strong><br />
</strong></p>
<div id=":1lo"><strong> PW=`echo &#8216;test1234&#8242; | base64`<br />
gconftool-2 &#8211;type string &#8211;set /desktop/gnome/remote_access/vnc_password $PW</strong></div>
<div><strong><br />
</strong><em>#to disable the icon visibility of remote connection established. </em><strong><br />
</strong></div>
<div><strong>gconftool-2 -s -t string   /desktop/gnome/remote_access/icon_visibility  never</strong></div>
]]></content:encoded>
			<wfw:commentRss>http://smartproteam.com/shell-script-to-enable-remote-desktop-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>shell script to query  mysql</title>
		<link>http://smartproteam.com/shell-script-to-query-mysql/</link>
		<comments>http://smartproteam.com/shell-script-to-query-mysql/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:29:05 +0000</pubDate>
		<dc:creator>Smart</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[shell script mysql]]></category>

		<guid isPermaLink="false">http://smartproteam.com/?p=897</guid>
		<description><![CDATA[This script help you understand how to query  mysql using shell script.
its an basic example :

#!/bin/bash
#shell script  to query mysql
db=joomla #db of the table
username=root # you need to provide the username here
pwd=xxxxxx #here you need to enter password
host=localhost #here hostame
mysql -h $host -u $username -p$pwd -D $db -e &#8220;select * ...]]></description>
			<content:encoded><![CDATA[<p>This script help you understand how to query  mysql using shell script.</p>
<p><em>its an basic example :<br />
</em></p>
<p><strong>#!/bin/bash<br />
#shell script  to query mysql<br />
db=joomla #db of the table<br />
username=root # you need to provide the username here<br />
pwd=xxxxxx #here you need to enter password<br />
host=localhost #here hostame</strong></p>
<p><strong>mysql -h $host -u $username -p$pwd -D $db -e &#8220;select * from jos_banner;&#8221;</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://smartproteam.com/shell-script-to-query-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell script to add an static ip</title>
		<link>http://smartproteam.com/shell-script-to-add-an-static-ip/</link>
		<comments>http://smartproteam.com/shell-script-to-add-an-static-ip/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:18:32 +0000</pubDate>
		<dc:creator>Smart</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://smartproteam.com/?p=895</guid>
		<description><![CDATA[Shell script to add static ip .
#!/bin/sh
#shell script to add static ip

killall dhclinet
echo &#8220;Adding static ip&#8221;
sudo ifconfig eth0 up 192.168.1.2 netmask 255.255.255.0
echo &#8220;successfully added eth0&#8243;
echo &#8220;checking weather the gw is reachable or not &#8221;
while [ -n  "$(ping -c 2 192.168.16.1 &#124; grep 100%)" ]
do
echo &#8220;gateway not reachable try it agian&#8221;
exit
done
echo  ...]]></description>
			<content:encoded><![CDATA[<p>Shell script to add static ip .</p>
<p><strong>#!/bin/sh</strong></p>
<p><strong>#shell script to add static ip<br />
</strong></p>
<p><strong>killall dhclinet<br />
echo &#8220;Adding static ip&#8221;<br />
sudo ifconfig eth0 up 192.168.1.2 netmask 255.255.255.0<br />
echo &#8220;successfully added eth0&#8243;<br />
echo &#8220;checking weather the gw is reachable or not &#8221;<br />
while [ -n  "$(ping -c 2 192.168.16.1 | grep 100%)" ]<br />
do<br />
echo &#8220;gateway not reachable try it agian&#8221;<br />
exit<br />
done<br />
echo  &#8220;now adding default gateway for this network&#8221;<br />
sudo route add default gw 192.168.1.1<br />
echo &#8220;now checking weather it is added or not &#8221;<br />
route -n<br />
echo &#8221; sucessfully added&#8221;<br />
done</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://smartproteam.com/shell-script-to-add-an-static-ip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Script for memory alert</title>
		<link>http://smartproteam.com/shell-script-for-memory-alert/</link>
		<comments>http://smartproteam.com/shell-script-for-memory-alert/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 17:17:16 +0000</pubDate>
		<dc:creator>Smart</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://smartproteam.com/?p=811</guid>
		<description><![CDATA[Shell script which tell about low memory status message with xwindow dailog box.
#!/bin/sh
#
#author : admin@smartproteam.com
#copy rights@smartproteam 2009
#script to low ram alert 
tolmem=$(free -m&#124; grep Mem &#124; awk &#8216;{print $4}&#8217;)
expmem=300
if [ $tolmem -lt $expmem ]
then
xmessage &#8220;Physical mem is low&#8221;
fi
output


]]></description>
			<content:encoded><![CDATA[<p>Shell script which tell about low memory status message with xwindow dailog box.</p>
<p>#!/bin/sh<br />
<strong>#<br />
#author : admin@smartproteam.com<br />
#copy rights@smartproteam 2009<br />
#script to low ram alert </strong></p>
<p><strong>tolmem=$(free -m| grep Mem | awk &#8216;{print $4}&#8217;)<br />
expmem=300<br />
if [ $tolmem -lt $expmem ]<br />
then<br />
xmessage &#8220;Physical mem is low&#8221;<br />
fi</strong></p>
<p><strong>output</strong></p>
<p><strong><img class="aligncenter size-full wp-image-813" title="mem" src="http://smartproteam.com/wp-content/uploads/2009/08/mem.jpg" alt="mem" width="150" height="77" /><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://smartproteam.com/shell-script-for-memory-alert/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shell script to ping multiple hosts</title>
		<link>http://smartproteam.com/shell-script-ping-multiple-hosts/</link>
		<comments>http://smartproteam.com/shell-script-ping-multiple-hosts/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 09:19:39 +0000</pubDate>
		<dc:creator>smart</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[multi host ping]]></category>
		<category><![CDATA[multiple ping]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[shell script to ping]]></category>

		<guid isPermaLink="false">http://smartproteam.com/?p=276</guid>
		<description><![CDATA[Script to ping multiple host .
first step follows

create a .txt file with hostnames
for example
ping.txt
hostname1 or ip
hostname2 or ip
copy  below script into a file and name it as hostping.sh
#!/bin/bash
#
#author : admin@smartproteam.com
#copy rights@smartproteam 2009
#script to ping multiple hosts
#for loop
for i in cat `cat  ~/ping.txt`
do
fping $i &#124; grep unreachable
done
Now change the ...]]></description>
			<content:encoded><![CDATA[<p><strong>Script to ping multiple host .</strong></p>
<p>first step follows<br />
<strong><br />
create a .txt file with hostnames</strong></p>
<p>for example</p>
<p>ping.txt<br />
hostname1 or ip<br />
hostname2 or ip</p>
<p>copy  below script into a file and name it as hostping.sh</p>
<p><strong>#!/bin/bash<br />
#<br />
#author : admin@smartproteam.com<br />
#copy rights@smartproteam 2009<br />
#script to ping multiple hosts</p>
<p>#for loop<br />
for i in cat `cat  ~/ping.txt`<br />
do<br />
fping $i | grep unreachable<br />
done</strong></p>
<p>Now change the <strong>permissions of the script</strong> file to all excutable<br />
<strong><br />
chmod +x  hostping.sh</strong></p>
<p>then run it as</p>
<p>$<strong>./hostping.s</strong>h</p>
]]></content:encoded>
			<wfw:commentRss>http://smartproteam.com/shell-script-ping-multiple-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
