The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-11-2007
janemary.a janemary.a is offline
Registered User
  
 

Join Date: May 2007
Posts: 12
Question Processing a CSV file

Hi

I'm reading a comma separated file record by record. After reading a record, I'm tokenizing it using strtok() function and moving the tokens into a structure.

But suppose if a record is of the following format,i.e two commas appear one after another, then the strtok function skips the blank token and moves to next token. But I want to Move a blank space into the corresponding structure member. How can i solve this pbm ? Can anyone help me with this please ?

123,0,2,,123

Thanks,
Jane A