An open API service indexing awesome lists of open source software.

https://github.com/hymkor/richcsv2poor

Rich-CSV to awk-readable-CSV converter
https://github.com/hymkor/richcsv2poor

awk c

Last synced: 23 days ago
JSON representation

Rich-CSV to awk-readable-CSV converter

Awesome Lists containing this project

README

        

Rich-CSV to awk-readable-CSV converter
======================================

This program replaces delimiters:

- Replacing `,` not enclosed with double-quotations to `\v` (Vertical Tab)
- Replacing `\n` (Line Feed) not enclosed with double-quotations to `\f` (Form Feed)
- Removing double-quotations

Example
-------

demo.csv:

```.csv

"NEWLINE <
> FIELD",1
"COMMA <,>",2
```

```
$ ./richcsv2poor demo.csv | gawk 'BEGIN{ FS="\v" ; RS="\f" } { printf "%d: [%s]\n",$2,$1 }'
1: [NEWLINE <
> FIELD]
2: [COMMA <,>]
```