Fixed width data files are probably the most annoying data to import into database.
This utility allows user to insert user-defined column separators into user-defided positions of flat file table given in fixed-width format.
I am using this utility to import astronomical catalogs provided as flat tables at CDS ftp-server into postgresql;

Build:
$ make all [cc={icc|gcc}]

Install:
$ make install [prefix=/path/to/your/bin/directory]

Example of usage:
$ gzip -dc table.dat.gz | fw2csv --stops=4,10,11,20,30,36 -d '|' -header 1 | psql wsdb -c "copy mytable from stdin with csv delimiter '|'"

For the list of available options call
$ fw2csv --help

Project Activity

See All Activity >

License

Public Domain

Follow fw2csv

fw2csv Web Site

Other Useful Business Software
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of fw2csv!

Additional Project Details

Operating Systems

BSD, Linux

User Interface

Command-line, Console/Terminal

Programming Language

C

Related Categories

C Data Formats Software, C Database Software, C Astronomy Software

Registered

2012-08-24