<?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>LEXO &#124; We don't learn for the school, we learn for life. &#187; Programming</title>
	<atom:link href="http://lexo.lx-networks.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://lexo.lx-networks.net</link>
	<description>Juan José Vaca Vadillo :: Non scholae, sed vitae discimus</description>
	<lastBuildDate>Tue, 20 Jul 2010 15:42:53 +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 inter field separator (IFS)</title>
		<link>http://lexo.lx-networks.net/2010/07/15/bash-inter-field-separator-ifs/</link>
		<comments>http://lexo.lx-networks.net/2010/07/15/bash-inter-field-separator-ifs/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 22:03:30 +0000</pubDate>
		<dc:creator>lexo</dc:creator>
				<category><![CDATA[BASH]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://lexo.lx-networks.net/?p=1275</guid>
		<description><![CDATA[Example: export IFS=$'\n' for i in $(find .); do echo LEXO$i done It work better for me under GNU/Linux Slackware, but is reported that under GNU/Linux Ubuntu it doesn&#8217;t work and the change for it is: Example: export IFS=$' ' # in the second line, generating the newline for i in $(find .); do echo [...]]]></description>
			<content:encoded><![CDATA[<p>Example:</p>
<p><code>export IFS=$'\n'</p>
<p>for i in $(find .);<br />
do<br />
    echo LEXO$i<br />
done</code></p>
<p>It work better for me under GNU/Linux Slackware, but is reported that under GNU/Linux Ubuntu it doesn&#8217;t work and the change for it is:</p>
<p>Example:</p>
<p><code>export IFS=$'<br />
' # in the second line, generating the newline</p>
<p>for i in $(find .);<br />
do<br />
    echo LEXO$i<br />
done</code></p>
<p>We can use hexadecimal too:</p>
<p>IFS=$&#8217;\x20&#8242; # Space<br />
IFS=$&#8217;\x09&#8242; # Tab<br />
IFS=$&#8217;\x0A&#8217; # Line Feed<br />
IFS=$&#8217;\x0D&#8217; # Carriage Return</p>
<p>Source:<br />
<a href="http://tldp.org/LDP/abs/html/internalvariables.html">http://tldp.org/LDP/abs/html/internalvariables.html</a><br />
<a href="http://wikiri.upc.es/index.php/BASH_uso_IFS">http://wikiri.upc.es/index.php/BASH_uso_IFS</a><br />
<a href="http://forum.soft32.com/linux2/Bug-409179-DASH-Settings-IFS-work-properly-ftopict70039.html">http://forum.soft32.com/linux2/Bug-409179-DASH-Settings-IFS-work-properly-ftopict70039.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lexo.lx-networks.net/2010/07/15/bash-inter-field-separator-ifs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LightBlue</title>
		<link>http://lexo.lx-networks.net/2010/03/04/lightblue/</link>
		<comments>http://lexo.lx-networks.net/2010/03/04/lightblue/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 15:00:44 +0000</pubDate>
		<dc:creator>lexo</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://lexo.lx-networks.net/?p=1039</guid>
		<description><![CDATA[LightBlue is a cross-platform Bluetooth API for Python which provides simple access to Bluetooth operations. It is available for Mac OS X, GNU/Linux and Nokia&#8217;s Python for Series 60 platform for mobile phones. LightBlue provides simple access to: * Device and service discovery (with and without end-user GUIs) * Standard socket interface for RFCOMM and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>LightBlue</strong> is a cross-platform Bluetooth API for Python which provides simple access to Bluetooth operations. It is available for Mac OS X, GNU/Linux and Nokia&#8217;s Python for Series 60 platform for mobile phones.</p>
<p>LightBlue provides simple access to:</p>
<p>    * Device and service discovery (with and without end-user GUIs)<br />
    * Standard socket interface for RFCOMM and L2CAP sockets (currently L2CAP client sockets only, and not on PyS60)<br />
    * Sending and receiving files over OBEX<br />
    * Advertising of RFCOMM and OBEX services<br />
    * Local device information</p>
<p>Source:<br />
<a href="http://lightblue.sourceforge.net/">http://lightblue.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lexo.lx-networks.net/2010/03/04/lightblue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fork alternative in PHP</title>
		<link>http://lexo.lx-networks.net/2009/12/07/fork-alternative-in-php/</link>
		<comments>http://lexo.lx-networks.net/2009/12/07/fork-alternative-in-php/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 06:35:25 +0000</pubDate>
		<dc:creator>lexo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://lexo.lx-networks.net/?p=853</guid>
		<description><![CDATA[This is an alternative of fork in PHP with exec() function: exec("/bin/ping 192.168.0.1 -c 12 2>/dev/null >&#038;- /dev/null &#038;"); Sources: http://joseph.randomnetworks.com/archives/2005/10/21/fake-fork-in-php/ http://immike.net/blog/2007/04/08/fork-php-and-speed-up-your-scripts/]]></description>
			<content:encoded><![CDATA[<p>This is an alternative of fork in PHP with exec() function:</p>
<p><code>exec("/bin/ping 192.168.0.1 -c 12 2>/dev/null >&#038;- <&#038;- >/dev/null &#038;");</code></p>
<p>Sources:<br />
<a href="http://joseph.randomnetworks.com/archives/2005/10/21/fake-fork-in-php">http://joseph.randomnetworks.com/archives/2005/10/21/fake-fork-in-php</a>/<br />
<a href="http://immike.net/blog/2007/04/08/fork-php-and-speed-up-your-scripts/">http://immike.net/blog/2007/04/08/fork-php-and-speed-up-your-scripts/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lexo.lx-networks.net/2009/12/07/fork-alternative-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BASH I/O stdout, stdin, and stderr</title>
		<link>http://lexo.lx-networks.net/2009/04/28/bash-io-stdout-stdin-and-stderr/</link>
		<comments>http://lexo.lx-networks.net/2009/04/28/bash-io-stdout-stdin-and-stderr/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 21:59:47 +0000</pubDate>
		<dc:creator>lexo</dc:creator>
				<category><![CDATA[BASH]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://lexo.lx-networks.net/?p=683</guid>
		<description><![CDATA[Some times we don&#8217;t want that command print out messages, and we need to clean all out messages (error or standard out) that it generates. For to solve this, we are going to use the I/O facility provided by BASH. BASH provide 3 file descriptors, and they are: 0 &#8211; stdin &#8211; Used for get [...]]]></description>
			<content:encoded><![CDATA[<p>Some times we don&#8217;t want that command print out messages, and we need to clean all out messages (error or standard out) that it generates. For to solve this, we are going to use the I/O facility provided by BASH.</p>
<p>BASH provide 3 file descriptors, and they are:<br />
<strong>0 &#8211; stdin</strong> &#8211; Used for get data.<br />
<strong>1 &#8211; stdout</strong> &#8211; Used for write standard data into screen.<br />
<strong>2 &#8211; stderr</strong> &#8211; Used for write error messages into screen.</p>
<p>So, using redirector (>) we can redirect(obviously) this data/messages wherever we want and also files.</p>
<p>Examples:<br />
¿How to redirect error messages(<strong>stderr</strong>) to standard out(<strong>stdout</strong>)?</p>
<p>ls this.file.doesnt.exist 2>&#038;1</p>
<p>¿How to redirect error messages(<strong>stderr</strong>) to limbo(/dev/null)?</p>
<p>ls this.file.doesnt.exist 2> /dev/null</p>
<p>¿How to redirect error(<strong>stderr</strong>) and standard out(<strong>stdout</strong>) messages to limbo?</p>
<p>ls this.file.doesnt.exist &#038;> /dev/null<br />
or<br />
ls this.file.doesnt.exist 2> /dev/null 1>&#038;2</p>
]]></content:encoded>
			<wfw:commentRss>http://lexo.lx-networks.net/2009/04/28/bash-io-stdout-stdin-and-stderr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
