<?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> &#187; Shell Scripts</title>
	<atom:link href="http://bipinb.com/category/linux/shell-scripts/feed" rel="self" type="application/rss+xml" />
	<link>http://bipinb.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 Aug 2010 02:14:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Shell script for checking a sytem alive or not</title>
		<link>http://bipinb.com/shell-script-for-checking-a-sytem-alive-or-not.htm</link>
		<comments>http://bipinb.com/shell-script-for-checking-a-sytem-alive-or-not.htm#comments</comments>
		<pubDate>Wed, 07 Jan 2009 12:38:05 +0000</pubDate>
		<dc:creator>Bipin Balakrishnan</dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[Checking alive system shell script.]]></category>
		<category><![CDATA[Shell script for checking a sytem alive or not]]></category>

		<guid isPermaLink="false">http://bipinb.com/?p=95</guid>
		<description><![CDATA[




It is necessary in certain cases we need to check whether the system  or server is alive and if we want some alert like email or sms to inform you that the system is down.We can do it by a simple shell script .All we need is to install a package call fping
fping  is a [...]]]></description>
			<content:encoded><![CDATA[<!-- Easy AdSense V2.83 -->
<!-- Post[count: 2] -->
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:12px;"><script type="text/javascript"><!--
google_ad_client = "pub-8516280820391538";
/* 468x60, created 6/14/10 */
google_ad_slot = "2348800126";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>It is necessary in certain cases we need to check whether the system  or server is alive and if we want some alert like email or sms to inform you that the system is down.We can do it by a simple shell script .All we need is to install a package call fping</p>
<p>fping  is a program like ping which uses the Internet Control Message Protocol (ICMP) echo request to determine if a target host is responding.  fping differs from ping in that you can specify any number of targets on the command  line,  or  specify a file containing the lists of targets to ping. Instead of sending to one target until it  times out or replies, fping will send out a ping packet and move on to the next target in a round-robin fashion.<br />
installing command</p>
<pre>sudo apt-get install fping</pre>
<p>Script:</p>
<pre>#!/bin/sh
status=`fping 192.168.1.22 | cut -d ' ' -f 3`
if [ $status != "alive" ]
then
echo 'system is down' //Here use your alert as you like email, sms, voice alert etc
fi</pre>
<p>Will check the system with IP 192.168.1.22 alive or not.Put it as a cron job and schedule the time interval to automatically check system status and get the alert&#8230;:)</p>
]]></content:encoded>
			<wfw:commentRss>http://bipinb.com/shell-script-for-checking-a-sytem-alive-or-not.htm/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Shell script for ftp download</title>
		<link>http://bipinb.com/shell-script-for-ftp-download.htm</link>
		<comments>http://bipinb.com/shell-script-for-ftp-download.htm#comments</comments>
		<pubDate>Wed, 20 Feb 2008 10:15:25 +0000</pubDate>
		<dc:creator>Bipin Balakrishnan</dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[Shell script for ftp download]]></category>
		<category><![CDATA[Shell script ftp download]]></category>

		<guid isPermaLink="false">http://bipinb.com/?p=32</guid>
		<description><![CDATA[




It is some time necessary to automatically download a file from a ftp server daily.We can automate it by writing a shell script and putting it as a cron.A sample script is show below.When it got run it will login and download the file &#8220;1.txt&#8221; in to the current working folder from the directory &#8220;ftp&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>It is some time necessary to automatically download a file from a ftp server daily.We can automate it by writing a shell script and putting it as a cron.A sample script is show below.When it got run it will login and download the file &#8220;1.txt&#8221; in to the current working folder from the directory &#8220;ftp&#8221; in the ftp server.</p>
<p>#!/bin/sh<br />
rm 1.txt<br />
HOST=&#8217;213.104.257.88&#8242;<br />
PORT=&#8217;21&#8242;<br />
USER=&#8217;bipin&#8217;<br />
PASSWD=&#8217;bipin&#8217;<br />
FILE=&#8217;1.txt&#8217;<br />
ftp -n $HOST $PORT &lt;&lt;END_SCRIPT<br />
quote USER $USER<br />
quote PASS $PASSWD<br />
cd ftp<br />
bin<br />
get $FILE<br />
quit<br />
END_SCRIPT<br />
exit 0</p>
]]></content:encoded>
			<wfw:commentRss>http://bipinb.com/shell-script-for-ftp-download.htm/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
