<?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>Cupfighter.net &#187; Unix</title>
	<atom:link href="http://www.cupfighter.net/index.php/category/unix-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cupfighter.net</link>
	<description>A blog by Schuberg Philis colleagues</description>
	<lastBuildDate>Thu, 09 Feb 2012 14:27:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Python @SBP</title>
		<link>http://www.cupfighter.net/index.php/2010/12/python-sbp/</link>
		<comments>http://www.cupfighter.net/index.php/2010/12/python-sbp/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 12:57:54 +0000</pubDate>
		<dc:creator>Gert Kremer</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=1223</guid>
		<description><![CDATA[My first encounter with python was the embedded scripting engine inside XBMC. The code that came with some of the XMBC add-ons sparked my Python interest to the extent that I picked up a couple of O’Reilly books on the topic and started learning the language. When I joined Schuberg Philis, a few colleagues had [...]]]></description>
			<content:encoded><![CDATA[<p>My first encounter with python was the embedded scripting engine inside XBMC. The code that came with some of the XMBC add-ons sparked my Python interest to the extent that I picked up a couple of O’Reilly books on the topic and started learning the language.</p>
<p>When I joined Schuberg Philis, a few colleagues had Python skills, but Schuberg’s Python community was too small to ensure maintainability. This didn’t stop me from writing a couple of scripts in places where it made sense to use Python, like automating tasks in a Websphere environment using Jython (no, there is no Jerl <img src='http://www.cupfighter.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) and in writing one-off scripts where maintainability was not an issue. As a friendly language advocacy, some of the other engineers jokingly referred to Python as being “Perl for Germans”.</p>
<p>In the meantime more Python enthusiasts joined the company, resulting in more and more useful Python stuff being developed, checked into the repositories and actually being used on a daily basis. This including tooling for:<br />
-	Weblogic deployment<br />
-	Patch management on RedHat systems<br />
-	Reporting on incidents<br />
-	etc, etc.</p>
<p>So, all things considered, an in-house Python training looked like a good idea. Based on a one day Python training by Steve Holden I took at LISA2008, we approached Steve for a 2 day on-site training at Schuberg Philis HQ.  So last week, this actually happened and about 10 of us joined the training.</p>
<p>After going through the python language features (datatypes, mutable vs immutable, namespaces, assignments, staments, functions, exception, modules, OOP, re module), we spend the last afternoon of the training in a free format discussion, touching an a lot of interesting topics like:<br />
-	iteration protocol an generator functions<br />
-	Pickling, marshalling and shelving objects<br />
-	Kodos, regular expression build and test tool<br />
-	Multithreading vs multiprocessing<br />
-	Network programming<br />
-	Unit testing</p>
<p>Everyone took something different away from the training. Some of my gems are:<br />
-	“Pyton Module of the week”, which has picked up a new subscriber<br />
-	the fact that there is an XML element tree in the standard library (which  saves me from installing LXML all over the place), which was not covered in the 2.2 based “Learning Python book”.</p>
<p>The training was great and has certainly broadened as well as deepened our Python skills. So, if Python is Perl for Germans, I’m, proud to quote JFK in saying “Ich bin ein Berliner” <img src='http://www.cupfighter.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Let’s see more Python at @Schuberg Philis in 2011 and beyond!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2010/12/python-sbp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Damian Conway&#8217;s Quantum::Superpositions talk</title>
		<link>http://www.cupfighter.net/index.php/2010/10/damian-conways-quantumsuperpositions-talk/</link>
		<comments>http://www.cupfighter.net/index.php/2010/10/damian-conways-quantumsuperpositions-talk/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 14:35:56 +0000</pubDate>
		<dc:creator>Otto Jongerius</dc:creator>
				<category><![CDATA[Misc fun]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[conway]]></category>
		<category><![CDATA[junctions]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[perl6]]></category>
		<category><![CDATA[seminars]]></category>
		<category><![CDATA[superpositions]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=1176</guid>
		<description><![CDATA[All things considered, Damians Conway&#8217;s talk is Yet Another Perl6 Promotion (YAPP), but a damn fun one.  Highlighting some very funky new features that Perl 6 makes happen, in constant time. Theoretically. Conway is one of the best speakers I&#8217;ve seen so far. His talks have speed, passion, a big dose of absurd humor and [...]]]></description>
			<content:encoded><![CDATA[<p>All things considered, <a href="http://damian.conway.org"> Damians Conway&#8217;s</a> talk is Yet Another Perl6 Promotion (YAPP), but a damn fun one.  Highlighting some very funky new features that Perl 6 makes happen, in constant time. Theoretically.</p>
<p>Conway is one of the best speakers I&#8217;ve seen so far. His talks have speed, passion, a big dose of absurd humor and loads of geek references. If you have the chance to attend one of his talks: go see him, you won&#8217;t be disappointed, promise.</p>
<p>The talks starts with a lighthearted refresh of the history of quantum mechanics, unexpected revelations about Bohrs activities in modeling and winter sports and so on.<br />
When the audience is under his spell Conway dives a bit deeper and shows many examples of Perl 6&#8242;s more natural syntax, and possible uses of superpositions. Showing how superpositions -called Junctions in Perl 6, are not just reserved for mad scientists. Junctions might be damn useful for programmers; replacing contrived nested for loops with elegant code generating prime&#8217;s, testing list membership, doing string comparison, all the while letting Perl take care of parallelization automagically, in constant time. Theoretically.</p>
<p>A very simple example showing the power of superpositions, in Perl 5, taken from the description page of <a href="http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm">Quantum::Superpositions.pm</a>:</p>
<p><strong><code>$ideal = any( all("tall", "rich", "handsome"),<br />
all("rich", "old"),<br />
all("smart","Australian","rich")<br />
);</code></strong></p>
<p><em>Operations involving such a composite superposition operate recursively and in parallel on each its states individually and then recompose the result. For example:</em></p>
<p><strong><code>while (@features = get_description) {<br />
if (any(@features) eq $ideal) {<br />
print "True love";<br />
}<br />
}</code></strong></p>
<p><em>The any(@features) eq $ideal equality is true if the input characteristics collectively match any of the three superimposed conjunctive superpositions. That is, if the characteristics collectively equate to each of &#8220;tall&#8221; and &#8220;rich&#8221; and &#8220;handsome&#8221;, or to both &#8220;rich&#8221; and &#8220;old&#8221;, or to all three of &#8220;smart&#8221; and &#8220;Australian&#8221; and &#8220;rich&#8221;.</em></p>
<p>Find a good description of the concepts <a href="http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm#DESCRIPTION">here</a>, and most of the examples used in his talk on <a href="http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm#EXAMPLES">here</a> but you&#8217;ll miss the funky Perl 6 rewrites of them. Junctions are documented in the Perl 6 documentation <a href="http://perlcabal.org/syn">here</a>.</p>
<p>Start using Superpositions/Junctions in Perl 5 by installing the Quantum::Superpositions module from <a href="http://search.cpan.org/~dconway/Quantum-Superpositions-1.03/lib/Quantum/Superpositions.pm">CPAN</a>. The module is currently maintained by <a href="http://search.cpan.org/~LEMBARK">Steven Lembark</a>, and will only add the &#8220;any&#8221;, &#8220;all&#8221; and &#8220;eigenstate&#8221; operators. For a more up to date implementation with more junction operators and autothreading fetch Perl 6 by installing <a href="http://rakudo.org">Raduko</a>.</p>
<p>Can&#8217;t wait until Conway returns for part II: <a href="http://damian.conway.org/Seminars/TimeSpace.html">Time::Space::Continuum</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2010/10/damian-conways-quantumsuperpositions-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LISA09 #2</title>
		<link>http://www.cupfighter.net/index.php/2009/12/lisa09-02/</link>
		<comments>http://www.cupfighter.net/index.php/2009/12/lisa09-02/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 17:26:00 +0000</pubDate>
		<dc:creator>Adam Kowalski</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Lisa]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=831</guid>
		<description><![CDATA[LISA is for sure is sort of event where every geek will find himself like home. It is really good feeling to be surrounded by people who know stuff and enjoy technology everyday. So LISA09 took place between 1 and 6th of November, 2009 in lovely Baltimore, MD. I chose to follow more the tutorials [...]]]></description>
			<content:encoded><![CDATA[<p>LISA is for sure is sort of event where every geek will find himself like home. It is really good feeling to be surrounded by people who know stuff and enjoy technology everyday.</p>
<p>So LISA09 took place between 1 and 6th of November, 2009 in lovely Baltimore, MD. I chose to follow more the tutorials (trainings) path. Got five tutorials &#8211; one bad, two medium and two nice ones. The problem with tutorials is that sometimes they are very basic which I really didn&#8217;t expect to be a case on such event.</p>
<p><span id="more-831"></span></p>
<p>So a quick summary on the thing that got my attention.</p>
<p>A non-technical tutorial about management skills. Looked like regular project/team management training but with special attention to the idea of geeks being managed by geeks. So no suits in the area. As we all know it is not easy to manage highly skilled individuals or being a &#8220;proxy&#8221; between business and the geeks. One of the big issues – managing people way older and more experienced than you are – was also covered. Unfortunately it was just confirmed to be not that easy to do..</p>
<p>Lot of noise around ZFS. Nice training about the file system internals. Also other trainings given by James Mauro and Richard Elling were very interesting &#8211; DTrace, Solaris 10 performance tuning etc. SUN (probably as always at LISA) was very noticeable at the conference. Evening sessions kind of Schuberg Philis&#8217; style although they still need some practice in that area <img src='http://www.cupfighter.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>cfengnine3 vs. puppet &#8211; unfortunately didn’t attend to any of those workshops but you could smell a gun powder in the air <img src='http://www.cupfighter.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>XEN &#8211; as great it is everyone knows but they really should spend some effort in doing a good presentation/training because the one which took place in Baltimore wasn&#8217;t the best way to get on board with it.</p>
<p>Google was giving away a free stuff, it was very popular..</p>
<p>Over the Edge System Administration – nice one, basically non standard system administration procedures (behavior). Stuff that happens for everyone from time to time. Do something not very common which works and sometimes stays in production for years.. Kind of BOFHish too..</p>
<p>Maybe some tips for people who will attend in LISA in future:</p>
<ul>
<li>Avoid trainings unless you’re really sure that level/scope will really suits you</li>
<li>Wear black clothes – people will like you more</li>
<li>Grow a beard – you will be respected more</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2009/12/lisa09-02/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LISA 2009</title>
		<link>http://www.cupfighter.net/index.php/2009/11/lisa-2009/</link>
		<comments>http://www.cupfighter.net/index.php/2009/11/lisa-2009/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 22:39:59 +0000</pubDate>
		<dc:creator>Sjoerd Tromp</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Lisa]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=815</guid>
		<description><![CDATA[Already three weeks back from Lisa, and after some gentle stimulation trying to write down my experiences of this event. For the people who don&#8217;t know LISA, LISA is the Large Installation System Administration conference, a whole week of talks, trainings and workshops about various subjects all related to the work of unix admins in [...]]]></description>
			<content:encoded><![CDATA[<p>Already three weeks back from Lisa, and after some gentle stimulation trying to write down my experiences of this event. For the people who don&#8217;t know LISA, LISA is the Large Installation System Administration conference, a whole week of talks, trainings and workshops about various subjects all related to the work of unix admins in big IT environments.</p>
<p>From what I understood from people who had been here previously, the attendee list was a lot smaller than previous years. But still, there were more than enough people to share a talk with. It was good to have the opportunity to talk to people working at some big and very known companies like Yahoo, Pixar etc. But also I met some people who worked for less know companies (at least for me) but maybe even more interesting companies, for example, the national democratic institute.  A non-profit organization facilitating democracy in countries where democracy isn’t that natural as in most western countries. I don’t think a lot of system admins have to worry about problems like militia stealing servers from your datacenter.</p>
<p>The first 5 days I followed a set of trainings, some days training for the whole day, some days a morning and an afternoon session. In general I was a bit disappointed by the trainings, they covered a lot of basic stuff, a whole day can be a very long sit for just 2 new bits of information. But a few sessions were quite interesting and/or entertaining.</p>
<p><span id="more-815"></span>One of the more interesting ones was the IPv6 talk by Rudi van Drunen (who will also be the program chair for next year). The information wasn&#8217;t particularly new or interesting (‘We really need IPv6 because we will be out of IP&#8217;s very soon!’) but it&#8217;s funny to listen to a fellow Dutch guy giving a talk on the other side of the ocean. Makes you feel a bit at home <img src='http://www.cupfighter.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Another talk which I found interesting was the Time Management for System Administrators by Thomas A. Limoncelli, a nice and funny guy to listen too with very practical tricks and solutions to spend your time more efficiently. Especially his tips on spending as less as possible of your time in meetings were very good. One of the more funny one was, tell the other people that you really have just a half hour of time, and ask them to move your subject to the start of the meeting and leave after half an hour. Not really nice, but efficient.  One I really liked was, to let everybody write down the items they want to discuss in a wiki with a death line of one day before the meeting and cancel the meeting if no subject were brought up. This ensures that meetings are only organized on a need to have basis.</p>
<p>On the Friday and last day I planned a Tech Sessions Day, this has more the setup of a standard conference, 3 tracks of various topics all about 2 hours each. I enjoyed this setup a lot more. It’s probably better suited for my short attention span <img src='http://www.cupfighter.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . I especially liked the talk from 2 Google guys, who were presenting some software they build while working for Google, and were now releasing it to the public. It gave me some insight in how Google is developing software and approaching system administrative problems. The software is a kind of meta language enabling a generic way of managing the configurations of various firewall equipment (Cisco, Juniper, Iptables).</p>
<p>All together it was a long week, but well spent with a lot of new experiences and also a nice opportunity to learn a bit more about my co-workers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2009/11/lisa-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kerberos Based SSO and Apache</title>
		<link>http://www.cupfighter.net/index.php/2009/06/kerberos-based-sso-and-apache/</link>
		<comments>http://www.cupfighter.net/index.php/2009/06/kerberos-based-sso-and-apache/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 09:51:33 +0000</pubDate>
		<dc:creator>Roeland Kuipers</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sso]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=275</guid>
		<description><![CDATA[Similar as OpenSSH Authentication Using Kerberos, but now Transparent Kerberos Authentication via Apache against Active Directory using mod_auth_kerb. This enables SSO from IE and Firefox on Apache, IE and Firefox configurations to enable this are also described in the document. Abstract:  The Apache authentication module mod_auth_kerb allows Apache to authenticate users against a Kerberos KDC [...]]]></description>
			<content:encoded><![CDATA[<p>Similar as<a href="http://www.cupfighter.net/index.php/2009/06/openssh-authentication-using-kerberos/" target="_blank"> OpenSSH Authentication Using Kerberos</a>, but now Transparent Kerberos Authentication via Apache against Active Directory using mod_auth_kerb. This enables SSO from IE and Firefox on Apache, IE and Firefox configurations to enable this are also described in the document.</p>
<blockquote><p><strong>Abstract</strong>:  The Apache authentication module mod_auth_kerb allows Apache to authenticate users against a Kerberos KDC including one from ActiveDirectory. Kerberos itself can be fairly complex to set up. This guide will attempt to show the specific steps required to make this possible as well as discuss security limitations specific to the interoperability matters. This guide assumes a basic understanding of Kerberos V and that the Active Directory domain controller is properly configured prior to starting this process.</p></blockquote>
<p><a href="http://port25.technet.com/archive/2008/01/25/technical-analysis-apache-with-mod-auth-kerb-and-windows-server.aspx" target="_blank">Technical Analysis: Apache with mod_auth_kerb and Windows Server</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2009/06/kerberos-based-sso-and-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSH Authentication using Kerberos</title>
		<link>http://www.cupfighter.net/index.php/2009/06/openssh-authentication-using-kerberos/</link>
		<comments>http://www.cupfighter.net/index.php/2009/06/openssh-authentication-using-kerberos/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 09:07:09 +0000</pubDate>
		<dc:creator>Roeland Kuipers</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=269</guid>
		<description><![CDATA[An interesting paper on how to authenticate against Active Directory using Kerberos and OpenSSH. This will enable SSO capabilities between Linux and windows, if used in combination with an Kerberos enabled SSH. And maybe even 2-factor authentication if combined with smartcards, haven&#8217;t tested this but should be working in theory if you use an SSH [...]]]></description>
			<content:encoded><![CDATA[<p>An interesting paper on how to authenticate against Active Directory using Kerberos and OpenSSH. This will enable SSO capabilities between Linux and windows, if used in combination with an Kerberos enabled SSH. And maybe even 2-factor authentication if combined with smartcards, haven&#8217;t tested this but should be working in theory if you use an SSH client from windows at least.</p>
<p>Components used:</p>
<p>On linux:</p>
<ul>
<li>openssh</li>
<li>openssh-server</li>
<li>samba-common</li>
<li>samba-client</li>
<li>krb5-workstation</li>
<li>krb5-libs</li>
</ul>
<p>On Windows:</p>
<ul>
<li>Windows Support Tools</li>
</ul>
<p><a href="http://port25.technet.com/Videos/research/OpenSSH%20on%20Linux%20using%20Windows.pdf" target="_blank">OpenSSH on Linux using Windows/Kerberos for Authentication</a></p>
<p><a href="http://www.helpdesk.umd.edu/topics/applications/kerberos/4775/" target="_blank">Putty With Kerberos</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2009/06/openssh-authentication-using-kerberos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Less is more</title>
		<link>http://www.cupfighter.net/index.php/2009/06/less-is-more/</link>
		<comments>http://www.cupfighter.net/index.php/2009/06/less-is-more/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 07:14:56 +0000</pubDate>
		<dc:creator>Gert Kremer</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[what's my ip]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=253</guid>
		<description><![CDATA[Less is more what's my IP service on <a href="http://ip.yppy.eu/"> http://ip.yppy.eu/</a>.]]></description>
			<content:encoded><![CDATA[<p>Every once in a while, I resort to one of the many “what&#8217;s my IP” type websites to lookup which external IP address I&#8217;m currently using. These sites have their uses for both professional, as well as personal purposes. Many of these sites provide a lot more information than I’m really after. In the end, I only want to see my current external IP address.
</p>
<p>
All the well intended, but known, technical and geo-location info presented by the numerous “what is my IP” sites tends to draw away attention from what you’re after and it doesn’t really play well with tools like ‘curl’ or ‘wget’.
</p>
<p>
There used to be a simple site I used, which just returned just your IP address located at http://www.whatismyip.org/, but this one also grew a lot of fat. Yesterday, I once again found myself looking for an external IP address, on a server with ‘curl’ and ‘wget’, and decided it was time I rolled what I was looking for myself. This turned into an extremely simple mod_python based scriptlet, which provides a no frills “What’s My IP” service, returning nothing more than a &#8220;text/plain&#8221; response with your current IP address.
</p>
<p>
This service is running on my recently upgraded employee rack server at Schuberg Philis at <a href="http://ip.yppy.eu/"> http://ip.yppy.eu/</a>. For me it provided useful and I hope other people also find this ‘less is more’ service of use. And yes, I will keep it clutter free.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2009/06/less-is-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Needs an OO Database but you have &#8220;only&#8221; Bash?</title>
		<link>http://www.cupfighter.net/index.php/2009/06/needs-an-oo-database-but-you-have-only-bash/</link>
		<comments>http://www.cupfighter.net/index.php/2009/06/needs-an-oo-database-but-you-have-only-bash/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 08:07:35 +0000</pubDate>
		<dc:creator>Enrico Romani</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[object oriented]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.cupfighter.net/?p=237</guid>
		<description><![CDATA[Have a look at this script from Stephane Chazelas appeared in the Appendix A of a very old version of the &#8220;Advanced Bash-Scripting Guide&#8221;. #!/bin/bash # obj-oriented.sh: Object-oriented programming in a shell script. # Script by Stephane Chazelas. person.new() # Looks almost like a class declaration in C++. { local obj_name=$1 name=$2 firstname=$3 birthdate=$4 eval "$obj_name.set_name() { eval [...]]]></description>
			<content:encoded><![CDATA[<p>Have a look at this script from Stephane Chazelas appeared in the Appendix A of a <em>very old</em> version of the &#8220;<strong>Advanced Bash-Scripting Guide&#8221;.</strong></p>
<pre class="PROGRAMLISTING">#!/bin/bash
# obj-oriented.sh: Object-oriented programming in a shell script.
# Script by Stephane Chazelas.

person.new()        # Looks almost like a class declaration in C++.
{
  local obj_name=$1 name=$2 firstname=$3 birthdate=$4

  eval "$obj_name.set_name() {
          eval \"$obj_name.get_name() {
                   echo \$1
                 }\"
        }"

  eval "$obj_name.set_firstname() {
          eval \"$obj_name.get_firstname() {
                   echo \$1
                 }\"
        }"

  eval "$obj_name.set_birthdate() {
          eval \"$obj_name.get_birthdate() {
            echo \$1
          }\"
          eval \"$obj_name.show_birthdate() {
            echo \$(date -d \"1/1/1970 0:0:\$1 GMT\")
          }\"
          eval \"$obj_name.get_age() {
            echo \$(( (\$(date +%s) - \$1) / 3600 / 24 / 365 ))
          }\"
        }"

  $obj_name.set_name $name
  $obj_name.set_firstname $firstname
  $obj_name.set_birthdate $birthdate
}

echo

person.new self Bozeman Bozo 101272413
# Create an instance of "person.new" (actually passing args to the function).

self.get_firstname       #   Bozo
self.get_name            #   Bozeman
self.get_age             #   28
self.get_birthdate       #   101272413
self.show_birthdate      #   Sat Mar 17 20:13:33 MST 1973

echo

# typeset -f
# to see the created functions (careful, it scrolls off the page).

exit 0</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cupfighter.net/index.php/2009/06/needs-an-oo-database-but-you-have-only-bash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

