comparison mayachemtools/docs/scripts/html/SplitTextFiles.html @ 0:73ae111cf86f draft

Uploaded
author deepakjadmin
date Wed, 20 Jan 2016 11:55:01 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:73ae111cf86f
1 <html>
2 <head>
3 <title>MayaChemTools:Documentation:SplitTextFiles.pl</title>
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
5 <link rel="stylesheet" type="text/css" href="../../css/MayaChemTools.css">
6 </head>
7 <body leftmargin="20" rightmargin="20" topmargin="10" bottommargin="10">
8 <br/>
9 <center>
10 <a href="http://www.mayachemtools.org" title="MayaChemTools Home"><img src="../../images/MayaChemToolsLogo.gif" border="0" alt="MayaChemTools"></a>
11 </center>
12 <br/>
13 <div class="DocNav">
14 <table width="100%" border=0 cellpadding=0 cellspacing=2>
15 <tr align="left" valign="top"><td width="33%" align="left"><a href="./SplitSDFiles.html" title="SplitSDFiles.html">Previous</a>&nbsp;&nbsp;<a href="./index.html" title="Table of Contents">TOC</a>&nbsp;&nbsp;<a href="./TextFilesToHTML.html" title="TextFilesToHTML.html">Next</a></td><td width="34%" align="middle"><strong>SplitTextFiles.pl</strong></td><td width="33%" align="right"><a href="././code/SplitTextFiles.html" title="View source code">Code</a>&nbsp;|&nbsp;<a href="./../pdf/SplitTextFiles.pdf" title="PDF US Letter Size">PDF</a>&nbsp;|&nbsp;<a href="./../pdfgreen/SplitTextFiles.pdf" title="PDF US Letter Size with narrow margins: www.changethemargins.com">PDFGreen</a>&nbsp;|&nbsp;<a href="./../pdfa4/SplitTextFiles.pdf" title="PDF A4 Size">PDFA4</a>&nbsp;|&nbsp;<a href="./../pdfa4green/SplitTextFiles.pdf" title="PDF A4 Size with narrow margins: www.changethemargins.com">PDFA4Green</a></td></tr>
16 </table>
17 </div>
18 <p>
19 </p>
20 <h2>NAME</h2>
21 <p>SplitTextFiles.pl - Split CSV or TSV TextFile(s) into multiple text files</p>
22 <p>
23 </p>
24 <h2>SYNOPSIS</h2>
25 <p>SplitTextFiles.pl TextFile(s)...</p>
26 <p>SplitTextFiles.pl [<strong>-f, --fast</strong>] [<strong>-h, --help</strong>] [<strong>--indelim</strong> comma | semicolon]
27 [<strong>-l, --label</strong> yes | no] [<strong>-n, --numfiles</strong> number] [<strong>-o, --overwrite</strong>]
28 [<strong>--outdelim</strong> comma | tab | semicolon] [<strong>-q, --quote</strong> yes | no]
29 [<strong>-r, --root</strong> rootname] [<strong>-w, --workingdir</strong> dirname] TextFile(s)...</p>
30 <p>
31 </p>
32 <h2>DESCRIPTION</h2>
33 <p>Split CSV or TSV <em>TextFile(s)</em> into multiple text files. Each new text file contains
34 a subset of similar number of lines from the initial file. The file names are separated
35 by space. The valid file extensions are <em>.csv</em> and <em>.tsv</em> for comma/semicolon and
36 tab delimited text files respectively. All other file names are ignored. All the text
37 files in a current directory can be specified by <em>*.csv</em>, <em>*.tsv</em>, or the current
38 directory name. The <strong>--indelim</strong> option determines the format of <em>TextFile(s)</em>.
39 Any file which doesn't correspond to the format indicated by <strong>--indelim</strong> option
40 is ignored.</p>
41 <p>
42 </p>
43 <h2>OPTIONS</h2>
44 <dl>
45 <dt><strong><strong>-f, --fast</strong></strong></dt>
46 <dd>
47 <p>In this mode, <strong>--indelim, --outdelim</strong>, and <strong>-q --quote</strong> options are ignored. The
48 format of input and output file(s) are assumed to be similar. And the text lines
49 from input <em>TextFile(s)</em> are just transferred to output file(s) without any processing.</p>
50 </dd>
51 <dt><strong><strong>-h, --help</strong></strong></dt>
52 <dd>
53 <p>Print this help message.</p>
54 </dd>
55 <dt><strong><strong>--indelim</strong> <em>comma | semicolon</em></strong></dt>
56 <dd>
57 <p>Input delimiter for CSV <em>TextFile(s)</em>. Possible values: <em>comma or semicolon</em>.
58 Default value: <em>comma</em>. For TSV files, this option is ignored and <em>tab</em> is used as a
59 delimiter.</p>
60 </dd>
61 <dt><strong><strong>-l, --label</strong> <em>yes | no</em></strong></dt>
62 <dd>
63 <p>First line contains column labels. Possible values: <em>yes or no</em>. Default value: <em>yes</em>.</p>
64 </dd>
65 <dt><strong><strong>-n, --numfiles</strong> <em>number</em></strong></dt>
66 <dd>
67 <p>Number of new files to generate for each TextFile(s). Default: <em>2</em>.</p>
68 </dd>
69 <dt><strong><strong>-o, --overwrite</strong></strong></dt>
70 <dd>
71 <p>Overwrite existing files.</p>
72 </dd>
73 <dt><strong><strong>--outdelim</strong> <em>comma | tab | semicolon</em></strong></dt>
74 <dd>
75 <p>Output text file delimiter. Possible values: <em>comma, tab, or semicolon</em>.
76 Default value: <em>comma</em></p>
77 </dd>
78 <dt><strong><strong>-q, --quote</strong> <em>yes | no</em></strong></dt>
79 <dd>
80 <p>Put quotes around column values in output text file. Possible values: <em>yes or
81 no</em>. Default value: <em>yes</em>.</p>
82 </dd>
83 <dt><strong><strong>-r, --root</strong> <em>rootname</em></strong></dt>
84 <dd>
85 <p>New text file names are generated using the root: &lt;Root&gt;Part&lt;Count&gt;.&lt;Ext&gt;.
86 Default new file names: &lt;InitialTextFileName&gt;Part&lt;Count&gt;.&lt;Ext&gt;. The csv, and tsv
87 &lt;Ext&gt; values are used for comma/semicolon, and tab delimited text files
88 respectively.This option is ignored for multiple input files.</p>
89 </dd>
90 <dt><strong><strong>-w, --workingdir</strong> <em>dirname</em></strong></dt>
91 <dd>
92 <p>Location of working directory. Default: current directory.</p>
93 </dd>
94 </dl>
95 <p>
96 </p>
97 <h2>EXAMPLES</h2>
98 <p>To split each CSV text files into 4 different text files type:</p>
99 <div class="ExampleBox">
100 % SplitTextFiles.pl -n 5 -o Sample1.csv Sample2.csv
101 <br/>% SplitTextFiles.pl -n 5 -o *.csv</div>
102 <p>To split Sample1.tsv into 10 different CSV text files, type:</p>
103 <div class="ExampleBox">
104 % SplitTextFiles.pl -n 10 --outdelim comma -o Sample1.tsv</div>
105 <p>
106 </p>
107 <h2>AUTHOR</h2>
108 <p><a href="mailto:msud@san.rr.com">Manish Sud</a></p>
109 <p>
110 </p>
111 <h2>SEE ALSO</h2>
112 <p><a href="./JoinTextFiles.html">JoinTextFiles.pl</a>,&nbsp<a href="./MergeTextFiles.html">MergeTextFiles.pl</a>,&nbsp<a href="./ModifyTextFilesFormat.html">ModifyTextFilesFormat.pl</a>
113 </p>
114 <p>
115 </p>
116 <h2>COPYRIGHT</h2>
117 <p>Copyright (C) 2015 Manish Sud. All rights reserved.</p>
118 <p>This file is part of MayaChemTools.</p>
119 <p>MayaChemTools is free software; you can redistribute it and/or modify it under
120 the terms of the GNU Lesser General Public License as published by the Free
121 Software Foundation; either version 3 of the License, or (at your option)
122 any later version.</p>
123 <p>&nbsp</p><p>&nbsp</p><div class="DocNav">
124 <table width="100%" border=0 cellpadding=0 cellspacing=2>
125 <tr align="left" valign="top"><td width="33%" align="left"><a href="./SplitSDFiles.html" title="SplitSDFiles.html">Previous</a>&nbsp;&nbsp;<a href="./index.html" title="Table of Contents">TOC</a>&nbsp;&nbsp;<a href="./TextFilesToHTML.html" title="TextFilesToHTML.html">Next</a></td><td width="34%" align="middle"><strong>March 29, 2015</strong></td><td width="33%" align="right"><strong>SplitTextFiles.pl</strong></td></tr>
126 </table>
127 </div>
128 <br />
129 <center>
130 <img src="../../images/h2o2.png">
131 </center>
132 </body>
133 </html>