Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-11-2004, 04:12 AM   #1
LQ Newbie
Registered: Jan 2004
Location: Nottingham
Distribution: Redhat, AIX, SCO, NCR, OSX
Posts: 10

Rep: Reputation: 1
csv to fixed-length file


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



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gawk, comma delim to fixed length? johniccp Programming 1 01-20-2005 05:21 PM
C++ read csv file row into vector taban1 Programming 3 11-08-2004 03:01 PM
problems reading in fixed-length record file naijaguy Programming 1 08-24-2004 03:34 PM
Shell script to read from csv file hendemeg Programming 1 05-11-2004 09:23 PM
CSV File AMMullan Programming 2 11-10-2003 01:49 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration