If you have any dealings at all with data and databases, then you almost certainly will have have to deal with comma-separated values (CSV) data. Unfortunately, the CSV files you are given, or are required to produce, never seem to be in quite the right format for your particular business application. And because of the structure of CSV records, using standard text processing tools like sed, awk and perl on CSV files is not as simple as it might be.
The Solution CSVfix is a command-line tool specifically designed to deal with CSV data. With it you can, among other things:
- Reorder, remove, split and merge fields
- Convert case, trim leading & trailing spaces
- Search for specific content using regular expressions
- Filter out duplicate data or data on exclusion lists
- Enrich with data from other sources
- Add sequence numbers and file source information
- Split large CSV files into smaller files based on field contents
- Perform arithmetic calculations on individual fields
- Validate CSV data against a collection of validation rules
- Convert between CSV and fixed format, XML, SQL and DSV
CSVfix is available as a Windows binary installer, or in source form for both Windows and Linux/Unix platforms. The CSVfix manual, detailing all commands, is here. For questions and support on CSVfix, please use the support forum - particularly, please post there before raising an issue in the issue tracker.
CSVfix is free, open-source software, but if you would like to encourage its development please consider making a donation.