Hi.
If you are going to be dealing with DSV (delimiter-separated-value data, including CSV and TSV), you may be interested in a suite of tools from eBay.
The one that is most applicable here is:
csv2tsv Convert Comma-separated file to tab-separated file (tsv). (doc)
Path : ~/executable/csv2tsv
Version : v1.1.14
Type : ELF 64-bit LSB executable, x86-64, version 1 (GNU ...)
Home : https://github.com/eBay/tsv-utils-dlang
The tools are available in statically-linked executables as well as source, but the source is D, not all that common in my experience.
So for data on file z9:
"2017-09-30","ACBD,TVF","01234",NULL,18,NULL,"686091802","BANK OF ABCD, LIMITED, THE",790456
this code:
$ csv2tsv -t '|' z9
produces:
2017-09-30|ACBD,TVF|01234|NULL|18|NULL|686091802|BANK OF ABCD, LIMITED, THE|790456
On a system like:
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution : Debian 8.9 (jessie)
bash GNU bash 4.3.30
Tools in the suite are:
csv2tsv Convert Comma-separated file to tab-separated file (tsv).
keep-header Execute a command in a header aware fashion (tsv).
tsv-append Concatenates multiple TSV files.
tsv-filter Test fields for relationship, regular expression match, etc.
tsv-join Match input lines against lines from a 'filter' file.
tsv-pretty Output TSV data in a aligned format, cf. align.
tsv-sample Randomize, sample input lines.
tsv-select Re-order fields, cf. cut.
tsv-summarize Display results of aggregation operations on fields.
tsv-uniq Filter out duplicate lines using fields (or line) as a key.
Best wishes ... cheers, drl