1 | .TH zzcat 1 "2010-01-07" "zzcat @PACKAGE_VERSION@" |
---|
2 | .SH NAME |
---|
3 | zzcat \- 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 |
---|
15 | The \fBzzcat\fR utility reads files sequentially, writing them to the |
---|
16 | standard output. The user can decide which sequence of library calls is |
---|
17 | used to seek and read data. |
---|
18 | |
---|
19 | \fBzzcat\fR is primarily used as a debugging tool for \fBzzuf\fR, because |
---|
20 | it can emulate different programs' ways to read files. |
---|
21 | .SH OPTIONS |
---|
22 | .TP |
---|
23 | \fB\-A\fR, \fB\-\-show\-all\fR |
---|
24 | Equivalent to \fB\-vET\fR. |
---|
25 | .TP |
---|
26 | \fB\-b\fR, \fB\-\-number\-nonblank\fR |
---|
27 | Number nonempty output lines. |
---|
28 | .TP |
---|
29 | \fB\-e\fR |
---|
30 | Equivalent to \fB\-vET\fR. |
---|
31 | .TP |
---|
32 | \fB\-E\fR, \fB\-\-show\-ends\fR |
---|
33 | Display $ at end of each line. |
---|
34 | .TP |
---|
35 | \fB\-n\fR, \fB\-\-number\fR |
---|
36 | Number all output lines. |
---|
37 | .TP |
---|
38 | \fB\-r\fR, \fB\-\-repeat\fR=\fIloops\fR |
---|
39 | Concatenate all files \fIloops\fR times. |
---|
40 | .TP |
---|
41 | \fB\-t\fR |
---|
42 | Equivalent to \fB\-vT\fR. |
---|
43 | .TP |
---|
44 | \fB\-T\fR, \fB\-\-show\-tabs\fR |
---|
45 | Display TAB characters as ^I. |
---|
46 | .TP |
---|
47 | \fB\-v\fR, \fB\-\-show\-nonprinting\fR |
---|
48 | Use ^ and M- notation, except for LFD and TAB. |
---|
49 | .TP |
---|
50 | \fB\-x\fR, \fB\-\-execute\fR=\fIsequence\fR |
---|
51 | Read a file or a stream using the instruction sequence specified in |
---|
52 | \fIsequence\fR. |
---|
53 | |
---|
54 | Instructions are executed sequentially until the end of the program. |
---|
55 | End-of-file is not an exit condition, except where the \fBfeof\fR keyword is |
---|
56 | used: |
---|
57 | |
---|
58 | \fB fread(1,10); feof(1); fread(1,10)\fR |
---|
59 | |
---|
60 | Loops are permitted using the \fBrepeat\fR keyword. Again, \fBfeof\fR can be |
---|
61 | used to prematurely break out of a loop: |
---|
62 | |
---|
63 | \fB repeat(10000, fgetc() feof(1))\fR |
---|
64 | |
---|
65 | Instructions can be separated by spaces, commas or semicolons. |
---|
66 | A list of all available instructions and control keywords can be obtained |
---|
67 | using this command: |
---|
68 | |
---|
69 | \fB zzcat \-l\fR |
---|
70 | |
---|
71 | If 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 |
---|
77 | Display the list of supported keywords and functions and exit. |
---|
78 | .TP |
---|
79 | \fB\-h\fR, \fB\-\-help\fR |
---|
80 | Display a short help message and exit. |
---|
81 | .TP |
---|
82 | \fB\-V\fR, \fB\-\-version\fR |
---|
83 | Output version information and exit. |
---|
84 | .SH EXAMPLES |
---|
85 | .PP |
---|
86 | Read the first 1000 bytes of f, then exit: |
---|
87 | .PP |
---|
88 | \fB zzcat \-x \(aqfread(1,1000)\(aq f\fR |
---|
89 | .PP |
---|
90 | Read 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 |
---|
94 | Read f entirely, by calling \fBgetc()\fR repeatedly until end-of-file is |
---|
95 | reached: |
---|
96 | .PP |
---|
97 | \fB zzcat \-x \(aqrepeat(\-1, getc(), feof(1))\(aq \fRf |
---|
98 | .PP |
---|
99 | Read 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 |
---|
113 | Copyright \(co 2002\-2010 Sam Hocevar <sam@hocevar.net>. |
---|
114 | .PP |
---|
115 | \fBzzcat\fR and this manual page are free software. They come without any |
---|
116 | warranty, to the extent permitted by applicable law. You can redistribute |
---|
117 | them and/or modify them under the terms of the Do What The Fuck You Want |
---|
118 | To 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. |
---|
122 | An overview of the architecture and inner works is at |
---|
123 | \fBhttp://caca.zoy.org/wiki/zzuf/internals\fR. |
---|