<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>LINUX programming Forum RSS Feed (Replies Included)</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the 'LINUX programming' forum at Programmer's Heaven, including replies.</description>
    <language>en</language>
    <copyright>Copyright 2009 Programmers Heaven</copyright>
    <pubDate>Sat, 21 Nov 2009 11:58:20 -0700</pubDate>
    <lastBuildDate>Sat, 21 Nov 2009 11:58:20 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>About splice systemcall problem</title>
      <link>http://www.programmersheaven.com/mb/Linux/409626/409626/about-splice-systemcall-problem/</link>
      <description>hi,&lt;br /&gt;
   while i was using splice system call for copy one file to another,&lt;br /&gt;
I got the error is given below:&lt;br /&gt;
&lt;br /&gt;
splice() (from) failed: Invalid argument&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In file:&lt;br /&gt;
       int relay_fd,log_fd;&lt;br /&gt;
        int pipe_fd[2];&lt;br /&gt;
        int retval;&lt;br /&gt;
 After open the files,&lt;br /&gt;
   &lt;br /&gt;
   retval = splice(relay_fd, NULL, pipe_fd[1], NULL, 128, SPLICE_F_MOVE);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have any idea, please help me.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
manikandan&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/409626/409626/about-splice-systemcall-problem/</guid>
      <pubDate>Fri, 20 Nov 2009 03:35:59 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Fake Passports for Sale</title>
      <link>http://www.programmersheaven.com/mb/Linux/394732/409585/fake-passports-for-sale/#409585</link>
      <description>Fake Passports for Sale&lt;br /&gt;
&lt;br /&gt;
If you want to buy high quality fake forged fraudulent counterfeit duplicate false camouflage diplomatic passports and other identification documents of Australia, Austria, Belgium, Canada, Finland, France, Germany, Israel, Malaysia, Netherlands, New Zealand, South Africa, Switzerland, United Kingdom, United States and some other countries please visit this website:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.FakePassport.Ws"&gt;http://www.FakePassport.Ws&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
E-mail: FakePassports@Gmail.Com&lt;br /&gt;
&lt;br /&gt;
Diplomatic passports are also available on demand&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/394732/409585/fake-passports-for-sale/#409585</guid>
      <pubDate>Thu, 19 Nov 2009 03:08:37 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>pthread_mutex_call blocks forever causing cpu usage 100%</title>
      <link>http://www.programmersheaven.com/mb/Linux/409339/409339/pthread_mutex_call-blocks-forever-causing-cpu-usage-100/</link>
      <description>pthread_mutex_lock() call never returns causing other threads to wait &lt;br /&gt;
for gaining its lock forever in turn causing 100% cpu load. I have tried &lt;br /&gt;
using alternate call pthread_mutex_trylock() which try to lock and if the &lt;br /&gt;
mutex is locked in some other thread it returns with an error code.&lt;br /&gt;
&lt;br /&gt;
The above mentioned call pthread_mutex_lock is used in an application which &lt;br /&gt;
goes to full cpu load once mutex blocks forever, and even if i kill the application &lt;br /&gt;
and restart it, it will again go to full cpu load, the problem of full cpu load only gets &lt;br /&gt;
resolved when i restart the machine, is there any other alternate call or any other &lt;br /&gt;
possible solution for this problem.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/409339/409339/pthread_mutex_call-blocks-forever-causing-cpu-usage-100/</guid>
      <pubDate>Sun, 15 Nov 2009 21:55:43 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>hello</title>
      <link>http://www.programmersheaven.com/mb/Linux/409011/409011/hello/</link>
      <description>cheap sale&lt;br /&gt;
Welcome to our site: &lt;a href="http://www.voguecatch.com"&gt;http://www.voguecatch.com&lt;/a&gt;  &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/409011/409011/hello/</guid>
      <pubDate>Tue, 10 Nov 2009 03:58:22 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>hello</title>
      <link>http://www.programmersheaven.com/mb/Linux/409010/409010/hello/</link>
      <description>cheap sale&lt;br /&gt;
Welcome to our site: &lt;a href="http://www.voguecatch.com"&gt;http://www.voguecatch.com&lt;/a&gt;  &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/409010/409010/hello/</guid>
      <pubDate>Tue, 10 Nov 2009 03:56:48 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: (doubt) linux vs windows</title>
      <link>http://www.programmersheaven.com/mb/Linux/408638/408777/re-doubt-linux-vs-windows/#408777</link>
      <description>thnkx a lot man..</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408638/408777/re-doubt-linux-vs-windows/#408777</guid>
      <pubDate>Tue, 03 Nov 2009 12:42:09 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: (doubt) linux vs windows</title>
      <link>http://www.programmersheaven.com/mb/Linux/408638/408776/re-doubt-linux-vs-windows/#408776</link>
      <description>thnkx a lot man..</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408638/408776/re-doubt-linux-vs-windows/#408776</guid>
      <pubDate>Tue, 03 Nov 2009 12:42:08 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: (doubt) linux vs windows</title>
      <link>http://www.programmersheaven.com/mb/Linux/408638/408775/re-doubt-linux-vs-windows/#408775</link>
      <description>thnkx a lot man..</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408638/408775/re-doubt-linux-vs-windows/#408775</guid>
      <pubDate>Tue, 03 Nov 2009 12:40:36 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>My script returns an error when it doesn't like the input</title>
      <link>http://www.programmersheaven.com/mb/Linux/408649/408649/my-script-returns-an-error-when-it-doesnt-like-the-input/</link>
      <description>I have a script which assigns the output of a shell command to a string, for later comparison.&lt;br /&gt;
&lt;br /&gt;
The command typically outputs either "Idle" or&lt;br /&gt;
"Uploading 1 file (102.8 KB/sec, 1 min left)"&lt;br /&gt;
&lt;br /&gt;
I use a test:&lt;br /&gt;
&lt;br /&gt;
while test $status != 'Idle'&lt;br /&gt;
&lt;br /&gt;
However, when the string is not equal to 'Idle' it crashes, possibly because of the unusual characters such as / and ( etc. in the alternative output.&lt;br /&gt;
&lt;br /&gt;
Is it possible to compare or even prepare the string before comparison so that my script doesn't crash? Or is shell scripting limited in this way, in which case I should be using a different language?&lt;br /&gt;
&lt;br /&gt;
Here is the script in case it makes things clearer. It's purpose is to start dropbox, allow it's running while it is performing any action, but exiting if everything is already up to date.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#! /bin/sh
dropbox start

status=$(dropbox status)

while test $status != 'Idle'
do
  echo "Working"
  status=$(dropbox status)
done

echo "\nIdle again.. exiting"
dropbox stop&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408649/408649/my-script-returns-an-error-when-it-doesnt-like-the-input/</guid>
      <pubDate>Sat, 31 Oct 2009 16:24:49 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: (doubt) linux vs windows</title>
      <link>http://www.programmersheaven.com/mb/Linux/408638/408646/re-doubt-linux-vs-windows/#408646</link>
      <description>In general, the difference is that open-source code is available to anyone whereas closed-source means the creator of the application keeps the source to himself. For example, the source code of Linux is available at &lt;a href="http://kernel.org/"&gt;kernel.org/&lt;/a&gt;, but you can't get the source code of Windows anywhere (if you can, it'll be against the law).&lt;br /&gt;
&lt;br /&gt;
If there is something you want to change about a program, then you would typically tell the author about it and maybe he will then make those changes. But with open-source, you also have the option to download the source code, make your changes to it, recompile it and use it straight away. After that you may want to send those changes back to the author. If he thinks it's something useful, then your code could be used in the next official version of the software.&lt;br /&gt;
&lt;br /&gt;
Wikipedia has all the details:&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Open_source"&gt;http://en.wikipedia.org/wiki/Open_source&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Proprietary_software"&gt;http://en.wikipedia.org/wiki/Proprietary_software&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Comparison_of_open_source_and_closed_source"&gt;http://en.wikipedia.org/wiki/Comparison_of_open_source_and_closed_source&lt;/a&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408638/408646/re-doubt-linux-vs-windows/#408646</guid>
      <pubDate>Sat, 31 Oct 2009 15:19:59 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>(doubt) linux vs windows</title>
      <link>http://www.programmersheaven.com/mb/Linux/408638/408638/doubt-linux-vs-windows/</link>
      <description>how to write code for an application that makes it open source? hope, i am clear with my view.&lt;br /&gt;
&lt;br /&gt;
i mean windows was written in C and its closed whereas linux written in c is open.where is the difference?</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408638/408638/doubt-linux-vs-windows/</guid>
      <pubDate>Sat, 31 Oct 2009 12:50:40 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>How to create "post-it" note? Also, use .odt or rtf?</title>
      <link>http://www.programmersheaven.com/mb/Linux/408504/408504/how-to-create-post-it-note-also-use-odt-or-rtf/</link>
      <description>We are designing a cross platform note application for Linux using wxWidgets in C++ or in Python.&lt;br /&gt;
&lt;br /&gt;
But we have a few questions I need to try to find answers for.&lt;br /&gt;
&lt;br /&gt;
1. should we use a RTF format for the notes, or should we try to use the open source format .odt?  Our most important concern is that text formatting is preserved when users cut and paste from OpenOffice, Word, or from Firefox. Any recommendations on how to go about doing this?&lt;br /&gt;
&lt;br /&gt;
2. We want to include a 'Post-It' note feature similar to that used in WORD (in Word they call it "add comment") or in Adobe Acrobat (where it is like a little yellow sticky note) You can click on the document and add a 'comment'. A yellow little box will pop up in which you can type the comment.&lt;br /&gt;
Any suggestions on how to make this? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408504/408504/how-to-create-post-it-note-also-use-odt-or-rtf/</guid>
      <pubDate>Wed, 28 Oct 2009 20:27:45 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>question on use raw socket to a implement HTTP Proxy Server</title>
      <link>http://www.programmersheaven.com/mb/Linux/408353/408353/question-on-use-raw-socket-to-a-implement-http-proxy-server/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I am trying to implement a HTTP proxy server using raw socket.&lt;br /&gt;
&lt;br /&gt;
I create a alias IP address on eth1:0 192.168.0.200 on my linux box&lt;br /&gt;
&lt;br /&gt;
I opened a raw socket as:&lt;br /&gt;
&lt;br /&gt;
fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);&lt;br /&gt;
&lt;br /&gt;
and binds to 192.168.0.200 and port 3080&lt;br /&gt;
&lt;br /&gt;
bind(fd, (struct sockaddr *) &amp;amp;addr, sizeof(addr));&lt;br /&gt;
&lt;br /&gt;
However when I use netstat it shows the port as 255 as the following:&lt;br /&gt;
&lt;br /&gt;
raw 0 0 192.168.0.200:255 0.0.0.0:* 7 7469/test-http-proxy&lt;br /&gt;
&lt;br /&gt;
I changed the Firefox connection settings to Manual proxy configuration as:&lt;br /&gt;
&lt;br /&gt;
HTTP Proxy: 192.168.0.200 Port:3080&lt;br /&gt;
&lt;br /&gt;
I got this error from Firefox, and I did not receive any packets from the raw socket.&lt;br /&gt;
&lt;br /&gt;
The browser is configured to use a proxy server, but the proxy refused a connection.&lt;br /&gt;
&lt;br /&gt;
* Is the browser's proxy configuration correct? Check the settings and try again.&lt;br /&gt;
* Does the proxy service allow connections from this network?&lt;br /&gt;
* Still having trouble? Consult your network administrator or Internet provider for assistance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any ideas or pointers are appreciated.&lt;br /&gt;
&lt;br /&gt;
yu_zyy &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/408353/408353/question-on-use-raw-socket-to-a-implement-http-proxy-server/</guid>
      <pubDate>Mon, 26 Oct 2009 09:20:19 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>BASH:  SED/AWK A Variable</title>
      <link>http://www.programmersheaven.com/mb/Linux/406427/406427/bash--sedawk-a-variable/</link>
      <description>Hi Im wondering how to extract data from a variable.  I have a variable that contains YYYYMMDD, something like 20091013.  Can I extract the year, YYYY, to varA, the month, MM, to varB and the day, DD to vabC?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/406427/406427/bash--sedawk-a-variable/</guid>
      <pubDate>Wed, 14 Oct 2009 00:38:32 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>BASH: Script Input Flags</title>
      <link>http://www.programmersheaven.com/mb/Linux/405710/405710/bash-script-input-flags/</link>
      <description>Hi.  Im wondering if there is a way to use flags when starting a script.&lt;br /&gt;
Something like this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Script -a -b 10&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Right now Ive got something like this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
while getopts ab AA
   do case $AA in
       a) var="value"
       ;;
   esac
done          
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
So with that code I can only use flags ( -a -b ).  Can I do the -b 10 so it will store say varB=10?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/405710/405710/bash-script-input-flags/</guid>
      <pubDate>Mon, 12 Oct 2009 21:11:49 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Migrating my site from Ubuntu 9.04 to RedHat 5 - directory issues</title>
      <link>http://www.programmersheaven.com/mb/Linux/402270/402270/migrating-my-site-from-ubuntu-904-to-redhat-5---directory-issues/</link>
      <description>Hi All,&lt;br /&gt;
I'm attempting to migrate my website files from server Ubuntu 9.04 to RedHat 5. it's currently hosted in directory&lt;br /&gt;
\var\www\intranet&lt;br /&gt;
&lt;br /&gt;
but in RedHat 5 the root directory is&lt;br /&gt;
\var\www\documents\intranet&lt;br /&gt;
&lt;br /&gt;
I just want to know if avoioding/ignoring the document directory  and placing my intranet folder in the same www directory will cause problems.&lt;br /&gt;
Any assistance appreciated!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/402270/402270/migrating-my-site-from-ubuntu-904-to-redhat-5---directory-issues/</guid>
      <pubDate>Tue, 06 Oct 2009 08:32:00 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Samsung S3C2416 + Android = Embedded Solution</title>
      <link>http://www.programmersheaven.com/mb/Linux/400103/400103/samsung-s3c2416-+-android--embedded-solution/</link>
      <description>Samsung S3C2416 + Android + Embedded Solution &lt;br /&gt;
&lt;br /&gt;
A Cost-effective Solution, applied to industrial control, power, medical, media, communications, security, automotive, financial services, consumer electronics, handheld devices, teaching and other fields for the control panel, terminal, POS, terminal delivery, human-computer interaction interface.&lt;br /&gt;
&lt;br /&gt;
For more information, please visit:&lt;br /&gt;
&lt;a href="http://www.giayee.com/solutions/S3C2416%20Solution.asp"&gt;http://www.giayee.com/solutions/S3C2416%20Solution.asp&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/400103/400103/samsung-s3c2416-+-android--embedded-solution/</guid>
      <pubDate>Thu, 24 Sep 2009 20:41:06 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Marvell PXA310 + Android = Cellular &amp; Handheld Solutions</title>
      <link>http://www.programmersheaven.com/mb/Linux/400102/400102/marvell-pxa310-+-android--cellular--handheld-solutions/</link>
      <description>Marvell PXA310 + Android = Cellular &amp;amp; Handheld Solutions &lt;br /&gt;
&lt;br /&gt;
The PXA310 processor joins the PXA3xx processor family as a cost-effective solution with up to 806 MHz of power-efﬁcient compute performance, hardware video acceleration, and DRM security, enabling the development of cost-efficient smartphones, industrial embedded solutions, and handheld devices.&lt;br /&gt;
&lt;br /&gt;
For more information, please visit:&lt;br /&gt;
&lt;a href="http://www.giayee.com/solutions/PXA310%20Solutions.asp"&gt;http://www.giayee.com/solutions/PXA310%20Solutions.asp&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/400102/400102/marvell-pxa310-+-android--cellular--handheld-solutions/</guid>
      <pubDate>Thu, 24 Sep 2009 20:38:21 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Samsung S3C2440 + Linux = Handheld Solution</title>
      <link>http://www.programmersheaven.com/mb/Linux/400100/400100/samsung-s3c2440-+-linux--handheld-solution/</link>
      <description>Samsung S3C2440 + Linux = Handheld Solution &lt;br /&gt;
&lt;br /&gt;
A low-power, and high-performance microcontroller solution, suitable for PDA, portable media players, GPS and other multimedia terminals.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://www.giayee.com/images/2440.jpg" /&gt;http://www.giayee.com/images/2440.jpg&lt;br /&gt;
&lt;br /&gt;
KEY FEATURES&lt;br /&gt;
Around 1.2V internal, 1.8V/2.5V/3.3V memory, 3.3V external I/O microprocessor with 16KB I-Cache/16KB DCache/MMU&lt;br /&gt;
External memory controller (SDRAM Control and Chip Select logic)&lt;br /&gt;
LCD controller (up to 4K color STN and 256K color TFT) with LCD-dedicated DMA&lt;br /&gt;
4-ch DMA controllers with external request pins&lt;br /&gt;
3-ch UARTs (IrDA1.0, 64-Byte Tx FIFO, and 64-Byte Rx FIFO)&lt;br /&gt;
2-ch SPls&lt;br /&gt;
IIC bus interface (multi-master support)&lt;br /&gt;
IIS Audio CODEC interface&lt;br /&gt;
AC’97 CODEC interface&lt;br /&gt;
SD Host interface version 1.0 &amp;amp; MMC Protocol version 2.11 compatible&lt;br /&gt;
2-ch USB Host controller / 1-ch USB Device controller (ver 1.1)&lt;br /&gt;
4-ch PWM timers / 1-ch Internal timer / Watch Dog Timer&lt;br /&gt;
8-ch 10-bit ADC and Touch screen interface&lt;br /&gt;
RTC with calendar function&lt;br /&gt;
Camera interface (Max. 4096 x 4096 pixels input support. 2048 x 2048 pixel input support for scaling)&lt;br /&gt;
130 General Purpose I/O ports / 24-ch external interrupt source&lt;br /&gt;
Power control: Normal, Slow, Idle and Sleep mode&lt;br /&gt;
On-chip clock generator with PLL&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/400100/400100/samsung-s3c2440-+-linux--handheld-solution/</guid>
      <pubDate>Thu, 24 Sep 2009 20:27:39 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>gawk program</title>
      <link>http://www.programmersheaven.com/mb/Linux/399553/399553/gawk-program/</link>
      <description>Write a gawk program to create a text file "abc" containing only odd pages and file "xyz" containing only even pages from input file.(Assume Suitable page length) Please Help me&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/399553/399553/gawk-program/</guid>
      <pubDate>Wed, 23 Sep 2009 07:45:33 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Find command with MKSToolkit</title>
      <link>http://www.programmersheaven.com/mb/Linux/399513/399513/find-command-with-mkstoolkit/</link>
      <description>Hi All,&lt;br /&gt;
&lt;br /&gt;
I want to use the find command with MKS Toolkit. I am using the below syntax,&lt;br /&gt;
&lt;br /&gt;
find.exe . "pattern" -print &amp;gt; tmp.txt&lt;br /&gt;
&lt;br /&gt;
This command is working fine in Unix, but not in MKSToolkit. But it is exiting with 1. Can any one help me how to use the find command with MKS Toolkit.&lt;br /&gt;
&lt;br /&gt;
Thanks for your responses.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/399513/399513/find-command-with-mkstoolkit/</guid>
      <pubDate>Wed, 23 Sep 2009 01:54:00 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Ether header for tagged frames</title>
      <link>http://www.programmersheaven.com/mb/Linux/396834/396834/ether-header-for-tagged-frames/</link>
      <description>Hi,&lt;br /&gt;
Need Help!&lt;br /&gt;
I'm porting VxWorks code to Linux. Here in VxWorks I have a structure called ether_tag_header.&lt;br /&gt;
What is the equivalent structure in Linux?&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
struct ether_tag_header {&lt;br /&gt;
u_char ether_dhost[6];&lt;br /&gt;
u_char ether_shost[6];&lt;br /&gt;
u_char etherTag[4];&lt;br /&gt;
u_short ether_type;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Thanks in advance!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/396834/396834/ether-header-for-tagged-frames/</guid>
      <pubDate>Tue, 08 Sep 2009 05:22:14 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Re: Can't get socket peek to work</title>
      <link>http://www.programmersheaven.com/mb/Linux/395485/395498/re-cant-get-socket-peek-to-work/#395498</link>
      <description>Sorry, fixed! wrong diagnosis, MSG_PEEK seems to be working&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/395485/395498/re-cant-get-socket-peek-to-work/#395498</guid>
      <pubDate>Fri, 21 Aug 2009 13:58:54 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Can't get socket peek to work</title>
      <link>http://www.programmersheaven.com/mb/Linux/395485/395485/cant-get-socket-peek-to-work/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I am trying to peek the number of received bytes in a socket using the recv() function with the MSG_PEEK flag.&lt;br /&gt;
&lt;br /&gt;
So I wrote a line:&lt;br /&gt;
&lt;br /&gt;
maxToread = recv(source_fd, tmpBuffer, maxToRead, MSG_PEEK | MSG_DONTWAIT);&lt;br /&gt;
&lt;br /&gt;
and then if maxToRead &amp;gt; 0 (there is something to be read) I do:&lt;br /&gt;
&lt;br /&gt;
readn = recv(source_fd, buffer, msgLen, MSG_DONTWAIT);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the Man pages, the expected behavior when setting the MSG_PEEK flag is that the data is not removed from the reception buffer so that the next read returns the same data.&lt;br /&gt;
&lt;br /&gt;
In my case I am seeing that, after the first 'recv()' call (with MSG_PEEK), the second reads 0 bytes instead of reading the same data the first call read.&lt;br /&gt;
&lt;br /&gt;
This is quite annoying because I need to be able to check if there is data in the buffer without consuming it. Am I missing something here? Did I misunderstand the MSG_PEEK behavior?&lt;br /&gt;
&lt;br /&gt;
Any help appreciated!!&lt;br /&gt;
Thanks!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/395485/395485/cant-get-socket-peek-to-work/</guid>
      <pubDate>Fri, 21 Aug 2009 10:42:50 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>How to work with parameters in for-loop when making a script?</title>
      <link>http://www.programmersheaven.com/mb/Linux/395421/395421/how-to-work-with-parameters-in-for-loop-when-making-a-script/</link>
      <description>I'm trying to make a script that sort's numbers that are passed as parameters.( bubblesort)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#!/bin/sh

MINPARAMETERS=2
declare -a EXITNUMBERS
HELPNUMBER

if [ $# -lt $MINPARAMETERS ]
then 
	echo "The script needs at least " $MINPARAMETERS 
	echo 
	exit
else
	echo "The value of the parameters before the sorting:"
	echo $@
	echo	
fi
for (( h=1 ; h &amp;lt;= $# ; h++ ))
do
	EXITNUMBERS=$@
done
for (( i=1 ; i &amp;lt;= $# ; i++ ))
do
	for j 
	do	
	&lt;strong&gt;if [ $j -ge $((j+1)) ]&lt;/strong&gt;	
	then 	
	    HELPNUMBER=${EXITNUMBERS[j]}
            EXITNUMBERS[j]=${EXITNUMBERS[j+1]
            EXITNUMBERS[j+1]=$HELPNUMBER
	fi
	done
done
echo "The value of the parameters after sorting"
echo ${EXITNUMBERS[*]}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem is that I can't find the right syntaxis for:   &lt;br /&gt;
$[j+1] or $((j+1))&lt;br /&gt;
in the nested for-loop.&lt;br /&gt;
&lt;br /&gt;
I'm working with ubuntu.&lt;br /&gt;
If you see any other mistakes or have tips, I would appreciate it.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/Linux/395421/395421/how-to-work-with-parameters-in-for-loop-when-making-a-script/</guid>
      <pubDate>Thu, 20 Aug 2009 10:37:29 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
  </channel>
</rss>