<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading line by line using C in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914456#M103809</link>
    <description>As A Clay Stephenson said, use fgets() followed&lt;BR /&gt;by strtok(). Be very careful while using &lt;BR /&gt;strtok(), it's a little tricky if you have not &lt;BR /&gt;used it before.&lt;BR /&gt;&lt;BR /&gt;Another possible (and simpler) option is &lt;BR /&gt;strchr() instead of strtok(). See manpage for &lt;BR /&gt;more detail.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
    <pubDate>Mon, 25 Jul 2005 22:33:07 GMT</pubDate>
    <dc:creator>Biswajit Tripathy</dc:creator>
    <dc:date>2005-07-25T22:33:07Z</dc:date>
    <item>
      <title>Reading line by line using C</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914454#M103807</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt; Is there a way to write a c program to read a textfile line by line and also field by field seperated by a seperator i.e. like awk.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Henry</description>
      <pubDate>Mon, 25 Jul 2005 20:08:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914454#M103807</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-07-25T20:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading line by line using C</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914455#M103808</link>
      <description>The fgets() function will read until it 1) encounters a linefeed, 2) reaches EOF, or 3) fills the buffer you specify with the 'n' (2nd) parameter. The file pointer is left unchanged so the next call to fgets() will read the next line. Man fgets for details.&lt;BR /&gt;&lt;BR /&gt;To parse a line of text after reading it in with fgets() use strtok() or sscanf(). Man strtok, scanf for details.</description>
      <pubDate>Mon, 25 Jul 2005 20:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914455#M103808</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-07-25T20:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading line by line using C</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914456#M103809</link>
      <description>As A Clay Stephenson said, use fgets() followed&lt;BR /&gt;by strtok(). Be very careful while using &lt;BR /&gt;strtok(), it's a little tricky if you have not &lt;BR /&gt;used it before.&lt;BR /&gt;&lt;BR /&gt;Another possible (and simpler) option is &lt;BR /&gt;strchr() instead of strtok(). See manpage for &lt;BR /&gt;more detail.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Jul 2005 22:33:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914456#M103809</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-07-25T22:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reading line by line using C</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914457#M103810</link>
      <description>thanks guys, your suggestion works great.!</description>
      <pubDate>Tue, 26 Jul 2005 04:14:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-line-by-line-using-c/m-p/4914457#M103810</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-07-26T04:14:01Z</dc:date>
    </item>
  </channel>
</rss>

