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

NAME

6       zzcat - concatenate files using different instruction sequences
7

SYNOPSIS

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

DESCRIPTION

15       The  zzcat  utility reads files sequentially, writing them to the stan‐
16       dard output. The user can decide which sequence  of  library  calls  is
17       used to seek and read data.
18
19       zzcat  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                  zzcat -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           zzcat -x 'fread(1,1000)' f
91
92       Read the first four bytes of f, using four different instructions:
93
94           zzcat -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           zzcat -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           zzcat -x 'repeat(-1, fread(1,32768), feof(1))' f
104

SEE ALSO

106       zzuf(3), libzzuf(3)
107

AUTHOR

109       Copyright © 2002-2010 Sam Hocevar <sam@hocevar.net>.
110
111       zzcat and this manual page are free software.  They  come  without  any
112       warranty,  to  the  extent  permitted by applicable law. You can redis‐
113       tribute them and/or modify them under the terms of the Do What The Fuck
114       You Want To Public License, Version 2, as published by Sam Hocevar. See
115       http://sam.zoy.org/wtfpl/COPYING 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
123zzcat 0.13                        2010-01-07                          zzcat(1)
Impressum