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
- Host: GitHub
- URL: https://github.com/hymkor/richcsv2poor
- Owner: hymkor
- License: mit
- Created: 2021-05-30T06:46:32.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-14T07:44:33.000Z (almost 4 years ago)
- Last Synced: 2025-02-10T15:50:56.854Z (3 months ago)
- Topics: awk, c
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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-quotationsExample
-------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 <,>]
```