App-Bin4TSV
view release on metacpan or search on metacpan
scripts/csv2tsv view on Meta::CPAN
=head1 AUTHOR
Toshiyuki Shimono
bin4tsv@gmail.com
=head1 HISTORY
2015-09-28 : Firstly created on a whim.
2016-07-06 : Some options are added such as -2.
2016-08-03 : Response to tab and enter characgers.
2018-06-24 : Once realeased on CPAN for the sake of Table::Hack.
2018-07-04 : Refinements to options. English manual is added.
2018-07-09 : -s and -a is added. Enabled to show the error input by Text::CSV_XS.
=head1 LICENSE AND COPYRIGHT
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 L<http://www.gnu.org/licenses/>.
=begin JapaneseManual
csv2tsv file.csv > file.tsv
csv2tsv < file.csv > file.tsv
CSV å½¢å¼(RFC 4180)ã®ãã¡ã¤ã«ã TSVå½¢å¼(ã¿ãæååºåã) ã«å¤æããã
åºåã«ã¤ãã¦ã¯ãæåã³ã¼ã UTF-8 ã§æ¹è¡ã³ã¼ã㯠"\n" ã¨ãªãã
ãªãã·ã§ã³:
-e st : -t ã¾ã㯠-e ã§æå®ãããæååã«ä¸è´ããæååã®ç´åã«ã¨ã¹ã±ã¼ããç®çã«å
¥ããæååã
-t str : å
¥åã®ã¿ãæåãä½ã«ç½®ãæããããæååã§æå®ããã空æååãæå®ãããªãéããã¨ã¹ã±ã¼ããèæ
®ãããã
-n str : å
¥åã®æ¹è¡æåãä½ã«ç½®ãæããããæååã§æå®ããã空æååãæå®ãããªãéããã¨ã¹ã±ã¼ããèæ
®ãããã
-s char ; CSVã®ãã£ã¼ã«ãã®åºåãæåãæå®ãã³ã³ããã夿´ããããã
-v : ã¿ãæåã¨æ¹è¡æåã®åå¨ãå¿
ãææããã(-t ã -n ã®æå®ãããã°ï¼é常ãä½ãææã®è¡¨ç¤ºã¯ããªãã)
-Q : å
¥åã®ã¬ã³ã¼ãå
ã«ãã¿ãæåã¾ãã¯æ¹è¡æåããã£ã¦ããè¦åãåºããªããä»ãããã¨ã§é«éåã¯ããã(no check)
-2 : ã¬ã³ã¼ãã®åºåããåä¸ã® \n ã§ã¯ãªãã¦ã2åç¶ãã \n\n ã«ãããCSVã®ã»ã«å
ã«æ¹è¡æåãããå ´åã«ä½¿ããããããªãã
-~ : TSVå½¢å¼ããCSVå½¢å¼ã«å¤æã -t 㨠-n 㨠-e ã®æå®ã§ãã®ããã°ã©ã ã§å¤ææ¸ã¿ã¨ä»®å®ãã¦ãã¿ããæ¹è¡ã復å
ã
-a ; å
¨ã¦ã®ãã£ã¼ã«ããå¿
ãï¼ããã«ã¯ã©ã¼ãã¼ã·ã§ã³ã§å²ãããã«ããã
-@ N : æªå
¥åã®è¦åãNç§å¾ã«åºãããã«ããã
--help : ãã® $0 ã®ãã«ãã¡ãã»ã¼ã¸ãåºãã perldoc -t $0 | cat ã§ãã»ã¼åãã
--help opt : ãªãã·ã§ã³ã®ã¿ã®ãã«ããåºããopt以å¤ã§ã options ã¨å
é ã1æå以ä¸ä¸è´ããã°è¯ãã
--help en : è±æããã¥ã¢ã«ã表示ãã
--version : ãã®ããã°ã©ã ã®ãã¼ã¸ã§ã³æ
å ±ã表示ããã
éçºä¸ã®ã¡ã¢:
* ãã¹ããæ¸ãã¹ãã
* taintãæ¤åºãã¹ã-T ãæå®ãã¦ãããããã«ãã®ããã« perldoc ãèµ·åã§ããªããªã£ãã®ã§ã-tã«ããã
=cut
( run in 1.339 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )