File: zzat.1.in

package info (click to toggle)
zzuf 0.15-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,280 kB
  • ctags: 916
  • sloc: ansic: 7,266; sh: 581; cpp: 352; makefile: 80
file content (126 lines) | stat: -rw-r--r-- 3,781 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.TH zzat 1 "2015-01-06" "zzat @PACKAGE_VERSION@"
.SH NAME
zzat \- concatenate files using different instruction sequences
.SH SYNOPSIS
\fBzzat\fR [\fB\-AbdeEntTv\fR] [\fB\-r\fR \fIloops\fR]
[\fB\-x\fR \fIsequence\fR] [\fIFILE\fR]...
.br
\fBzzat \-l\fR | \fB\-\-list\fR
.br
\fBzzat \-h\fR | \fB\-\-help\fR
.br
\fBzzat \-V\fR | \fB\-\-version\fR
.SH DESCRIPTION
.PP
The \fBzzat\fR utility reads files sequentially, writing them to the
standard output. The user can decide which sequence of library calls is
used to seek and read data.

\fBzzat\fR is primarily used as a debugging tool for \fBzzuf\fR, because
it can emulate different programs' ways to read files.
.SH OPTIONS
.TP
\fB\-A\fR, \fB\-\-show\-all\fR
Equivalent to \fB\-vET\fR.
.TP
\fB\-b\fR, \fB\-\-number\-nonblank\fR
Number nonempty output lines.
.TP
\fB\-d\fR, \fB\-\-debug\fR
Output debugging information.
.TP
\fB\-e\fR
Equivalent to \fB\-vET\fR.
.TP
\fB\-E\fR, \fB\-\-show\-ends\fR
Display $ at end of each line.
.TP
\fB\-n\fR, \fB\-\-number\fR
Number all output lines.
.TP
\fB\-r\fR, \fB\-\-repeat\fR=\fIloops\fR
Concatenate all files \fIloops\fR times.
.TP
\fB\-t\fR
Equivalent to \fB\-vT\fR.
.TP
\fB\-T\fR, \fB\-\-show\-tabs\fR
Display TAB characters as ^I.
.TP
\fB\-v\fR, \fB\-\-show\-nonprinting\fR
Use ^ and M- notation, except for LFD and TAB.
.TP
\fB\-x\fR, \fB\-\-execute\fR=\fIsequence\fR
Read a file or a stream using the instruction sequence specified in
\fIsequence\fR.

Instructions are executed sequentially until the end of the program.
End-of-file is not an exit condition, except where the \fBfeof\fR keyword is
used:

\fB    fread(1,10); feof(1); fread(1,10)\fR

Loops are permitted using the \fBrepeat\fR keyword. Again, \fBfeof\fR can be
used to prematurely break out of a loop:

\fB    repeat(10000, fgetc() feof(1))\fR

Instructions can be separated by spaces, commas or semicolons.
A list of all available instructions and control keywords can be obtained
using this command:

\fB    zzat \-l\fR

If no sequence is specified, the following default sequence is used:

\fB    repeat(\-1, fread(1,32768), feof(1))\fR

.TP
\fB\-l\fR, \fB\-\-list\fR
Display the list of supported keywords and functions and exit.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display a short help message and exit.
.TP
\fB\-V\fR, \fB\-\-version\fR
Output version information and exit.
.SH EXAMPLES
.PP
Read the first 1000 bytes of f, then exit:
.PP
\fB    zzat \-x \(aqfread(1,1000)\(aq f\fR
.PP
Read the first four bytes of f, using four different instructions:
.PP
\fB    zzat \-x \(aqgetc(),fgetc(),getc_unlocked(),_IO_getc()\(aq f\fR
.PP
Read f entirely, by calling \fBgetc()\fR repeatedly until end-of-file is
reached:
.PP
\fB    zzat \-x \(aqrepeat(\-1, getc(), feof(1))\(aq \fRf
.PP
Read f entirely, in chunks of 32768 bytes until end-of-file is reached:
.PP
\fB    zzat \-x \(aqrepeat(\-1, fread(1,32768), feof(1))\(aq \fRf
.\" .PP
.\" Read only odd bytes, rewind file, then read all even bytes:
.\" .PP
.\" \fB    zzat \-x \(aqrepeat(\-1, getc(), feof(1), fseek(1,SEEK_CUR)),
.\" \fB              rewind(),
.\" \fB              repeat(\-1, fseek(1,SEEK_CUR), getc(), feof(1))\(aq
.SH SEE ALSO
.PP
\fBzzuf(3)\fR, \fBlibzzuf(3)\fR
.SH AUTHOR
.PP
Copyright \(co 2002\-2015 Sam Hocevar <sam@hocevar.net>.
.PP
\fBzzat\fR and this manual page are free software. They come without any
warranty, to the extent permitted by applicable law. You can redistribute
them and/or modify them under the terms of the Do What the Fuck You Want
to Public License, Version 2, as published by the WTFPL Task Force. See
\fBhttp://www.wtfpl.net/\fR for more details.
.PP
\fBzzuf\fR's webpage can be found at \fBhttp://caca.zoy.org/wiki/zzuf\fR.
An overview of the architecture and inner works is at
\fBhttp://caca.zoy.org/wiki/zzuf/internals\fR.