source: zzuf/trunk/doc/zzcat.1.in @ 4278

Last change on this file since 4278 was 4278, checked in by Sam Hocevar, 11 years ago

Add a -r flag to zzcat to repeatedly cat file lists.

File size: 3.6 KB
Line 
1.TH zzcat 1 "2010-01-07" "zzcat @PACKAGE_VERSION@"
2.SH NAME
3zzcat \- concatenate files using different instruction sequences
4.SH SYNOPSIS
5\fBzzcat\fR [\fB\-AbeEntTv\fR] [\fB\-r\fR \fIloops\fR]
6[\fB\-x\fR \fIsequence\fR] [\fIFILE\fR]...
7.br
8\fBzzcat \-l\fR | \fB\-\-list\fR
9.br
10\fBzzcat \-h\fR | \fB\-\-help\fR
11.br
12\fBzzcat \-V\fR | \fB\-\-version\fR
13.SH DESCRIPTION
14.PP
15The \fBzzcat\fR utility reads files sequentially, writing them to the
16standard output. The user can decide which sequence of library calls is
17used to seek and read data.
18
19\fBzzcat\fR is primarily used as a debugging tool for \fBzzuf\fR, because
20it can emulate different programs' ways to read files.
21.SH OPTIONS
22.TP
23\fB\-A\fR, \fB\-\-show\-all\fR
24Equivalent to \fB\-vET\fR.
25.TP
26\fB\-b\fR, \fB\-\-number\-nonblank\fR
27Number nonempty output lines.
28.TP
29\fB\-e\fR
30Equivalent to \fB\-vET\fR.
31.TP
32\fB\-E\fR, \fB\-\-show\-ends\fR
33Display $ at end of each line.
34.TP
35\fB\-n\fR, \fB\-\-number\fR
36Number all output lines.
37.TP
38\fB\-r\fR, \fB\-\-repeat\fR=\fIloops\fR
39Concatenate all files \fIloops\fR times.
40.TP
41\fB\-t\fR
42Equivalent to \fB\-vT\fR.
43.TP
44\fB\-T\fR, \fB\-\-show\-tabs\fR
45Display TAB characters as ^I.
46.TP
47\fB\-v\fR, \fB\-\-show\-nonprinting\fR
48Use ^ and M- notation, except for LFD and TAB.
49.TP
50\fB\-x\fR, \fB\-\-execute\fR=\fIsequence\fR
51Read a file or a stream using the instruction sequence specified in
52\fIsequence\fR.
53
54Instructions are executed sequentially until the end of the program.
55End-of-file is not an exit condition, except where the \fBfeof\fR keyword is
56used:
57
58\fB    fread(1,10); feof(1); fread(1,10)\fR
59
60Loops are permitted using the \fBrepeat\fR keyword. Again, \fBfeof\fR can be
61used to prematurely break out of a loop:
62
63\fB    repeat(10000, fgetc() feof(1))\fR
64
65Instructions can be separated by spaces, commas or semicolons.
66A list of all available instructions and control keywords can be obtained
67using this command:
68
69\fB    zzcat \-l\fR
70
71If no sequence is specified, the following default sequence is used:
72
73\fB    repeat(\-1, fread(1,32768), feof(1))\fR
74
75.TP
76\fB\-l\fR, \fB\-\-list\fR
77Display the list of supported keywords and functions and exit.
78.TP
79\fB\-h\fR, \fB\-\-help\fR
80Display a short help message and exit.
81.TP
82\fB\-V\fR, \fB\-\-version\fR
83Output version information and exit.
84.SH EXAMPLES
85.PP
86Read the first 1000 bytes of f, then exit:
87.PP
88\fB    zzcat \-x \(aqfread(1,1000)\(aq f\fR
89.PP
90Read the first four bytes of f, using four different instructions:
91.PP
92\fB    zzcat \-x \(aqgetc(),fgetc(),getc_unlocked(),_IO_getc()\(aq f\fR
93.PP
94Read f entirely, by calling \fBgetc()\fR repeatedly until end-of-file is
95reached:
96.PP
97\fB    zzcat \-x \(aqrepeat(\-1, getc(), feof(1))\(aq \fRf
98.PP
99Read f entirely, in chunks of 32768 bytes until end-of-file is reached:
100.PP
101\fB    zzcat \-x \(aqrepeat(\-1, fread(1,32768), feof(1))\(aq \fRf
102.\" .PP
103.\" Read only odd bytes, rewind file, then read all even bytes:
104.\" .PP
105.\" \fB    zzcat \-x \(aqrepeat(\-1, getc(), feof(1), fseek(1,SEEK_CUR)),
106.\" \fB              rewind(),
107.\" \fB              repeat(\-1, fseek(1,SEEK_CUR), getc(), feof(1))\(aq
108.SH SEE ALSO
109.PP
110\fBzzuf(3)\fR, \fBlibzzuf(3)\fR
111.SH AUTHOR
112.PP
113Copyright \(co 2002\-2010 Sam Hocevar <sam@hocevar.net>.
114.PP
115\fBzzcat\fR and this manual page are free software. They come without any
116warranty, to the extent permitted by applicable law. You can redistribute
117them and/or modify them under the terms of the Do What The Fuck You Want
118To Public License, Version 2, as published by Sam Hocevar. See
119\fBhttp://sam.zoy.org/wtfpl/COPYING\fR for more details.
120.PP
121\fBzzuf\fR's webpage can be found at \fBhttp://caca.zoy.org/wiki/zzuf\fR.
122An overview of the architecture and inner works is at
123\fBhttp://caca.zoy.org/wiki/zzuf/internals\fR.
Note: See TracBrowser for help on using the repository browser.