App::csv2tsv - A command line utility "csv2tsv" for easy and fairly properly transforming from CSV to TSV.
Version 0.51
csv2tsv [-t str] [-n str] [-v] [-Q] [-2] [-~] file
Transforms CSV formatted data (cf. RFC4180) into TSV formated data. Input is assumed to be UTF-8. (The input line ends can be both CRLF or LF. The output line ends are LF.) Warnings/erros would be properly printed on STDERR (as far as the author of this program experienced).
csv2tsv file.csv > file.tsv
csv2tsv -n '[\n]' file.csv > file.tsv # "\n" in the CSV cell will be transfomed to [\n].
csv2tsv -t TAB file.csv > file.tsv # "\t" in the CSV cell will be transfomed to "TAB". UTF-8 characters can be specified.
for i in *.csv ; do csv2tsv -n'"\n"' -t'"\t"' $i > ${i/csv/tsv} ; done # BASH or ZSH is required to use this "for" statement. Useful for multiple CSV files.
For the safety, when '-t' or '-n' is set with string character specification, a warning is displayed every time a values in the input cells matches the specified string charatcter unless -Q is set.
csv2tsv < file.csv > file.tsv # file name information cannot be passed to "csv2tsv". So the warning messages may lack a few information.
What the input TAB character will be replaced with is specified.
What "\n" character in the input CSV cell will be replaced with is specified.
Always tell the existence of "\t" or "\n" even if "-t str" or "-n str" is specified.
No warning even if "\t" or "\n" is included in the cell of input.
Double space output, to find "\n" anormality by human eyes. (For a kind expediency when this program author was firstly making this program)
The opposite conversion of csv2tsv, i.e. TSV to CSV conversion. (Every cell will be encloded by double quotes.)
Shows this help.
Shows Japanese help.
Shows the version information of this program.
"Toshiyuki Shimono", <bin4tsv at gmail.com>
<bin4tsv at gmail.com>
Please report any bugs or feature requests to bug-app-csv2tsv at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-csv2tsv. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-app-csv2tsv at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc App::csv2tsv
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-csv2tsv
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/App-csv2tsv
CPAN Ratings
http://cpanratings.perl.org/d/App-csv2tsv
Search CPAN
http://search.cpan.org/dist/App-csv2tsv/
Copyright 2018 "Toshiyuki Shimono".
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
To install App::csv2tsv, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::csv2tsv
CPAN shell
perl -MCPAN -e shell install App::csv2tsv
For more information on module installation, please visit the detailed CPAN module installation guide.