1zzat(1)                     General Commands Manual                    zzat(1)
2
3
4

NAME

6       zzat - concatenate files using different instruction sequences
7

SYNOPSIS

9       zzat [-AbdeEntTv] [-r loops] [-x sequence] [FILE]...
10       zzat -l | --list
11       zzat -h | --help
12       zzat -V | --version
13

DESCRIPTION

15       The zzat utility reads files sequentially, writing them to the standard
16       output. The user can decide which sequence of library calls is used  to
17       seek and read data.
18
19       zzat  is  primarily  used  as a debugging tool for zzuf, because it can
20       emulate different programs' ways to read files.
21

OPTIONS

23       -A, --show-all
24              Equivalent to -vET.
25
26       -b, --number-nonblank
27              Number nonempty output lines.
28
29       -d, --debug
30              Output debugging information.
31
32       -e     Equivalent to -vET.
33
34       -E, --show-ends
35              Display $ at end of each line.
36
37       -n, --number
38              Number all output lines.
39
40       -r, --repeat=loops
41              Concatenate all files loops times.
42
43       -t     Equivalent to -vT.
44
45       -T, --show-tabs
46              Display TAB characters as ^I.
47
48       -v, --show-nonprinting
49              Use ^ and M- notation, except for LFD and TAB.
50
51       -x, --execute=sequence
52              Read a file or a stream using the instruction sequence specified
53              in sequence.
54
55              Instructions are executed sequentially until the end of the pro‐
56              gram.  End-of-file is not an exit condition,  except  where  the
57              feof keyword is used:
58
59                  fread(1,10); feof(1); fread(1,10)
60
61              Loops are permitted using the repeat keyword. Again, feof can be
62              used to prematurely break out of a loop:
63
64                  repeat(10000, fgetc() feof(1))
65
66              Instructions can be separated by spaces, commas  or  semicolons.
67              A list of all available instructions and control keywords can be
68              obtained using this command:
69
70                  zzat -l
71
72              If no sequence is specified, the following default  sequence  is
73              used:
74
75                  repeat(-1, fread(1,32768), feof(1))
76
77
78       -l, --list
79              Display the list of supported keywords and functions and exit.
80
81       -h, --help
82              Display a short help message and exit.
83
84       -V, --version
85              Output version information and exit.
86

EXAMPLES

88       Read the first 1000 bytes of f, then exit:
89
90           zzat -x 'fread(1,1000)' f
91
92       Read the first four bytes of f, using four different instructions:
93
94           zzat -x 'getc(),fgetc(),getc_unlocked(),_IO_getc()' f
95
96       Read  f  entirely,  by  calling  getc() repeatedly until end-of-file is
97       reached:
98
99           zzat -x 'repeat(-1, getc(), feof(1))' f
100
101       Read f entirely, in chunks of 32768 bytes until end-of-file is reached:
102
103           zzat -x 'repeat(-1, fread(1,32768), feof(1))' f
104

SEE ALSO

106       zzuf(3), libzzuf(3)
107

AUTHOR

109       Copyright © 2002-2015 Sam Hocevar <sam@hocevar.net>.
110
111       zzat and this manual page are free software. They come without any war‐
112       ranty,  to the extent permitted by applicable law. You can redistribute
113       them and/or modify them under the terms of the Do  What  the  Fuck  You
114       Want  to  Public  License,  Version  2,  as published by the WTFPL Task
115       Force. See http://www.wtfpl.net/ for more details.
116
117       zzuf's webpage can be found at http://caca.zoy.org/wiki/zzuf.  An over‐
118       view     of    the    architecture    and    inner    works    is    at
119       http://caca.zoy.org/wiki/zzuf/internals.
120
121
122
123zzat 0.15                         2015-01-06                           zzat(1)
Impressum