LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   csv to fixed-length file (http://www.linuxquestions.org/questions/programming-9/csv-to-fixed-length-file-156185/)

roballen 03-11-2004 03:12 AM

csv to fixed-length file
 
Hi

I am trying to convert data from an old legacy system to a new(ish) application. The old system is capable of exporting some of its data in a CSV format, how the new application will only accept fixed-length fields.

I have a csv formatted file in the form of:

"information","information1","information2"... etc.

I would like to convert it to a fixed length file.

I know the size of each field which I would like to create. I have considered using 'typeset' to pad the variables out with spaces but did not really have much success.

I have recently discovered the perl mod. 'AnyData', but I am struggling to make it work. Installation was a little tricky with all of the dependancies.

Does anyone have any alternative ideas or suggestions? They would be much appreciated.


Thank you

Rob


All times are GMT -5. The time now is 01:36 PM.