Previous TOC Next | ModifyTextFilesFormat.pl | Code | PDF | PDFGreen | PDFA4 | PDFA4Green

## NAME

ModifyTextFilesFormat.pl - Change CSV Textfile(s) into TSV Textfile(s) and vice versa

## SYNOPSIS

ModifyTextFilesFormat.pl TextFile(s)...

ModifyTextFilesFormat.pl [-h, --help] [--indelim comma | semicolon] [--outdelim comma | tab | semicolon] [-q, --quote yes | no] [-r, --root rootname] [-w, --workingdir dirname] TextFile(s)...

## DESCRIPTION

Interchange CSV and TSV TextFile(s) format. Mutiple file names are separated by spaces. The valid file extensions are .csv and .tsv for comma/semicolon and tab delimited text files respectively. All other file names are ignored. All the text files in a current directory can be specified by *.csv, *.tsv, or the current directory name. The --indelim option determines the format of TextFile(s). Any file which doesn't correspond to the format indicated by --indelim option is ignored.

## OPTIONS

-h, --help

  Print this help message.

--indelim comma | semicolon

  Input delimiter for CSV TextFile(s). Possible values: comma or semicolon. Default value: comma. For TSV files, this option is ignored and tab is used as a delimiter.

-o, --overwrite

  Overwrite existing files.

--outdelim comma | tab | semicolon

  Output text file delimiter. Possible values: comma, tab, or semicolon Default value: comma.

-q, --quote yes | no

  Put quotes around column values in output text file. Possible values: yes or no. Default value: yes.

-r, --root rootname

  New text file name is generated using the root: <Root>.<Ext>. Default new file name: <InitialTextFileName>FormatModified.<Ext>. The csv, and tsv <Ext> values are used for comma/semicolon, and tab delimited text files respectively. This option is ignored for multiple input files.

-w, --workingdir dirname

  Location of working directory. Default: current directory.

## EXAMPLES

To convert Sample*.csv into TSV files, type:

% ModifyTextFilesFormat.pl --outdelim tab -q no -o Sample*.csv

To convert Sample1.tsv into NewSample1.csv without any quotes around column data values, type:

% ModifyTextFilesFormat.pl --outdelim comma - q no -r NewSample1 -o Sample1.tsv

## AUTHOR

Manish Sud

## SEE ALSO

ModifyNewLineChar.pl

## COPYRIGHT

Copyright (C) 2015 Manish Sud. All rights reserved.

This file is part of MayaChemTools.

MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Previous TOC Next | March 29, 2015 | ModifyTextFilesFormat.pl