1MK-FIFO-SPLIT(1)      User Contributed Perl Documentation     MK-FIFO-SPLIT(1)
2
3
4

NAME

6       mk-fifo-split - Split files and pipe lines to a fifo without really
7       splitting.
8

SYNOPSIS

10       Usage: mk-fifo-split [options] [FILE ...]
11
12       mk-fifo-split splits FILE and pipes lines to a fifo.  With no FILE, or
13       when FILE is -, read standard input.
14
15       Read hugefile.txt in chunks of a million lines without physically
16       splitting it:
17
18        mk-fifo-split --lines 1000000 hugefile.txt
19        while [ -e /tmp/mk-fifo-split ]; do cat /tmp/mk-fifo-split; done
20

RISKS

22       The following section is included to inform users about the potential
23       risks, whether known or unknown, of using this tool.  The two main
24       categories of risks are those created by the nature of the tool (e.g.
25       read-only tools vs. read-write tools) and those created by bugs.
26
27       mk-fifo-split creates and/or deletes the "--fifo" file.  Otherwise, no
28       other files are modified, and it merely reads lines from the file given
29       on the command-line.  It should be very low-risk.
30
31       At the time of this release, we know of no bugs that could cause
32       serious harm to users.
33
34       The authoritative source for updated information is always the online
35       issue tracking system.  Issues that affect this tool will be marked as
36       such.  You can see a list of such issues at the following URL:
37       <http://www.maatkit.org/bugs/mk-fifo-split>.
38
39       See also "BUGS" for more information on filing bugs and getting help.
40

DESCRIPTION

42       mk-fifo-split lets you read from a file as though it contains only some
43       of the lines in the file.  When you read from it again, it contains the
44       next set of lines; when you have gone all the way through it, the file
45       disappears.  This works only on Unix-like operating systems.
46
47       You can specify multiple files on the command line.  If you don't
48       specify any, or if you use the special filename "-", lines are read
49       from standard input.
50

OPTIONS

52       This tool accepts additional command-line arguments.  Refer to the
53       "SYNOPSIS" and usage information for details.
54
55       --config
56           type: Array
57
58           Read this comma-separated list of config files; if specified, this
59           must be the first option on the command line.
60
61       --fifo
62           type: string; default: /tmp/mk-fifo-split
63
64           The name of the fifo from which the lines can be read.
65
66       --force
67           Remove the fifo if it exists already, then create it again.
68
69       --help
70           Show help and exit.
71
72       --lines
73           type: int; default: 1000
74
75           The number of lines to read in each chunk.
76
77       --offset
78           type: int; default: 0
79
80           Begin at the Nth line.  If the argument is 0, all lines are printed
81           to the fifo.  If 1, then beginning at the first line, lines are
82           printed (exactly the same as 0).  If 2, the first line is skipped,
83           and the 2nd and subsequent lines are printed to the fifo.
84
85       --pid
86           type: string
87
88           Create the given PID file.  The file contains the process ID of the
89           script.  The PID file is removed when the script exits.  Before
90           starting, the script checks if the PID file already exists.  If it
91           does not, then the script creates and writes its own PID to it.  If
92           it does, then the script checks the following: if the file contains
93           a PID and a process is running with that PID, then the script dies;
94           or, if there is no process running with that PID, then the script
95           overwrites the file with its own PID and starts; else, if the file
96           contains no PID, then the script dies.
97
98       --statistics
99           Print out statistics between chunks.  The statistics are the number
100           of chunks, the number of lines, elapsed time, and lines per second
101           overall and during the last chunk.
102
103       --version
104           Show version and exit.
105

DOWNLOADING

107       You can download Maatkit from Google Code at
108       <http://code.google.com/p/maatkit/>, or you can get any of the tools
109       easily with a command like the following:
110
111          wget http://www.maatkit.org/get/toolname
112          or
113          wget http://www.maatkit.org/trunk/toolname
114
115       Where "toolname" can be replaced with the name (or fragment of a name)
116       of any of the Maatkit tools.  Once downloaded, they're ready to run; no
117       installation is needed.  The first URL gets the latest released version
118       of the tool, and the second gets the latest trunk code from Subversion.
119

ENVIRONMENT

121       The environment variable "MKDEBUG" enables verbose debugging output in
122       all of the Maatkit tools:
123
124          MKDEBUG=1 mk-....
125

SYSTEM REQUIREMENTS

127       You need Perl, DBI, DBD::mysql, and some core packages that ought to be
128       installed in any reasonably new version of Perl.
129

BUGS

131       For a list of known bugs see
132       <http://www.maatkit.org/bugs/mk-fifo-split>.
133
134       Please use Google Code Issues and Groups to report bugs or request
135       support: <http://code.google.com/p/maatkit/>.  You can also join
136       #maatkit on Freenode to discuss Maatkit.
137
138       Please include the complete command-line used to reproduce the problem
139       you are seeing, the version of all MySQL servers involved, the complete
140       output of the tool when run with "--version", and if possible,
141       debugging output produced by running with the "MKDEBUG=1" environment
142       variable.
143

COPYRIGHT, LICENSE AND WARRANTY

145       This program is copyright 2007-2011 Baron Schwartz.  Feedback and
146       improvements are welcome.
147
148       THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
149       WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
150       MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
151
152       This program is free software; you can redistribute it and/or modify it
153       under the terms of the GNU General Public License as published by the
154       Free Software Foundation, version 2; OR the Perl Artistic License.  On
155       UNIX and similar systems, you can issue `man perlgpl' or `man
156       perlartistic' to read these licenses.
157
158       You should have received a copy of the GNU General Public License along
159       with this program; if not, write to the Free Software Foundation, Inc.,
160       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
161

AUTHOR

163       Baron Schwartz
164

ABOUT MAATKIT

166       This tool is part of Maatkit, a toolkit for power users of MySQL.
167       Maatkit was created by Baron Schwartz; Baron and Daniel Nichter are the
168       primary code contributors.  Both are employed by Percona.  Financial
169       support for Maatkit development is primarily provided by Percona and
170       its clients.
171

VERSION

173       This manual page documents Ver 1.0.7 Distrib 7540 $Revision: 7477 $.
174
175
176
177perl v5.30.0                      2019-07-25                  MK-FIFO-SPLIT(1)
Impressum