<?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>x83.net &#187; Programming</title>
	<atom:link href="http://www.x83.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +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>Script to generate interface configs on Linux</title>
		<link>http://www.x83.net/script-to-generate-interface-configs-on-linux/</link>
		<comments>http://www.x83.net/script-to-generate-interface-configs-on-linux/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:26:54 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[DEVICE]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[ifcfg-eth1]]></category>
		<category><![CDATA[IPADDR]]></category>
		<category><![CDATA[touch]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=382</guid>
		<description><![CDATA[Generate ifcfg-eth1 307-366 configs. touch ifcfg-eth1:{307..366} for f in ifcfg-eth1:{307..366}; do cat origfile > &#8220;$f&#8221;; done for f in eth1:{307..366}; do echo &#8220;DEVICE=$f&#8221; >> &#8220;ifcfg-$f&#8221;; done for f in {307..366}; do echo &#8220;IPADDR=aaa.bbb.ccc.$((f-239))&#8221; >> &#8220;ifcfg-eth1:$f&#8221;; done origfile contains: GATEWAY=eee.fff.ggg.hhh TYPE=Ethernet BOOTPROTO=none NETMASK=255.255.255.192]]></description>
			<content:encoded><![CDATA[<p>Generate ifcfg-eth1 307-366 configs. </p>
<blockquote><p>touch ifcfg-eth1:{307..366}<br />
for f in ifcfg-eth1:{307..366}; do cat origfile > &#8220;$f&#8221;; done<br />
for f in eth1:{307..366}; do echo &#8220;DEVICE=$f&#8221; >> &#8220;ifcfg-$f&#8221;; done<br />
for f in {307..366}; do echo &#8220;IPADDR=aaa.bbb.ccc.$((f-239))&#8221; >> &#8220;ifcfg-eth1:$f&#8221;; done
</p></blockquote>
<p>origfile contains:</p>
<blockquote><p>GATEWAY=eee.fff.ggg.hhh<br />
TYPE=Ethernet<br />
BOOTPROTO=none<br />
NETMASK=255.255.255.192</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/script-to-generate-interface-configs-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending image emails with mutt from command line</title>
		<link>http://www.x83.net/sending-image-emails-with-mutt-from-command-line/</link>
		<comments>http://www.x83.net/sending-image-emails-with-mutt-from-command-line/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 06:32:46 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=313</guid>
		<description><![CDATA[ls &#124; perl -ne &#8216;$a=$_;chomp $a;$b=&#8221;mutt -s \&#8221;poza $a\&#8221; -a $a &#60;email&#62; &#60; message.txt\n&#8221;;print $b;`$b`&#8217;]]></description>
			<content:encoded><![CDATA[<blockquote><p>ls | perl -ne &#8216;$a=$_;chomp $a;$b=&#8221;mutt -s \&#8221;poza $a\&#8221; -a $a &lt;email&gt; &lt; message.txt\n&#8221;;print $b;`$b`&#8217;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/sending-image-emails-with-mutt-from-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to autorestart httpd server if it fails</title>
		<link>http://www.x83.net/script-to-autorestart-httpd-server-if-it-fails/</link>
		<comments>http://www.x83.net/script-to-autorestart-httpd-server-if-it-fails/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 06:24:38 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[checkhttp.sh]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[ipcrm]]></category>
		<category><![CDATA[ipcs]]></category>
		<category><![CDATA[nobody]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[restartsrv_httpd]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=261</guid>
		<description><![CDATA[I use this script on a cpanel server..if output of pgrep command is 0 then the $restart command is issued #!/bin/bash restart=&#8221;/scripts/restartsrv_httpd&#8221; pgrep httpd &#124;&#124; $restart exit 0 If its a VPS then I might add to clear the Semaphore Arrays. for i in `ipcs -s &#124; grep nobody &#124; awk &#8216;{print $2}&#8217;`; do ipcrm [...]]]></description>
			<content:encoded><![CDATA[<p>I use this script on a cpanel server..if output of pgrep command is 0 then the $restart command is issued</p>
<blockquote><p>#!/bin/bash<br />
restart=&#8221;/scripts/restartsrv_httpd&#8221;<br />
pgrep httpd || $restart<br />
exit 0</p></blockquote>
<p>If its a VPS then I might add to clear the Semaphore Arrays.</p>
<blockquote><p>for i in `ipcs -s | grep nobody | awk &#8216;{print $2}&#8217;`; do ipcrm -s $i; done</p></blockquote>
<p>Then I put this script into Cron to run every 5 minutes.</p>
<blockquote><p># MIN HOUR DAYOFMONTH MONTH DAYOFWEEK COMMAND<br />
*/5 * * * * /root/checkhttp.sh
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/script-to-autorestart-httpd-server-if-it-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl script to read .dbx files</title>
		<link>http://www.x83.net/perl-script-to-read-dbx-files/</link>
		<comments>http://www.x83.net/perl-script-to-read-dbx-files/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 07:31:13 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[dbx]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Transport]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=240</guid>
		<description><![CDATA[A customer asked me to filter a .dbx file (Outlook express) and extract some data. This script reads the .dbx and prints it in a readable format. #!/usr/bin/perl use Mail::Transport::Dbx; my $dbx = eval { Mail::Transport::Dbx->new( &#8220;Customer_List.dbx&#8221; )}; die $@ if $@; for my $msg ($dbx->emails) { my @bodxy = $msg->body; print @bodxy; }]]></description>
			<content:encoded><![CDATA[<p>A customer asked me to filter a .dbx file (Outlook express) and extract some data. This script reads the .dbx and prints it in a readable format. </p>
<blockquote><p>#!/usr/bin/perl<br />
use Mail::Transport::Dbx;</p>
<p>my $dbx = eval { Mail::Transport::Dbx->new( &#8220;Customer_List.dbx&#8221; )};<br />
die $@ if $@;</p>
<p>for my $msg ($dbx->emails) {<br />
    my @bodxy = $msg->body;<br />
    print @bodxy;<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/perl-script-to-read-dbx-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

