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 > UNIX for Dummies Questions & Answers
.
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 08-21-2008
dr46014 dr46014 is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 94
Creating CSV Files

I have a requiremnt to create one CSV file with initial 5 lines as blank rows.
From 5th row onwards the file is to be created from a list of varibales which gets evaluated.
Say A,B,C,D,E are 5 varibales with some value associated with each of them and data type is string.
So the 6th row should contain A,B,C,D,E
Again after 6th row the same set of varibales are evaluated again and the next to is appended to the file with similar structure and so on.

The file looks like

line1 :
line2 :
line3 :
line4 :
line5 :
line6 :10,XYZ,HTHK,7485566,BGYHUJJJ
line7 :20,hggo,gfgfr,grgregre,599999

the line x : should not be present.its there for understanding purpose.
Each row is based on some functional area and the values of varibales are assigned and then row is created.Then again another set of values are assigned.