Convert CSV records to TSV: Difference between revisions

Content added Content deleted
(→‎jq: gojq has been updated)
Line 183: Line 183:


'''The following program can also be used with gojq, the Go implementation of jq,
'''The following program can also be used with gojq, the Go implementation of jq,
but NUL (#x0) is left unaltered.'''
but until recently NUL (#x0) was left unaltered.'''


In this entry, the PEG grammar for "record" as defined in the task
In this entry, the PEG grammar for "record" as defined in the task
Line 234: Line 234:
| @tsv ;
| @tsv ;


# Transform an entire file:
# Transform an entire file assuming jq is invoked with the -n option
inputs | csv2tsv
inputs | csv2tsv
</syntaxhighlight>
</syntaxhighlight>
{{output}}
{{output}}
* Backquotes are uniformly duplicated.
* Backquotes are uniformly duplicated.
* gojq does not, and currently cannot, handle NUL (#x0) properly.
* Until recently gojq did not handle NUL (#x0) properly.


=={{header|Phix}}==
=={{header|Phix}}==