DOKK / manpages / debian 10 / zzuf / zzat.1.en
zzat(1) General Commands Manual zzat(1)

zzat - concatenate files using different instruction sequences

zzat [-AbdeEntTv] [-r loops] [-x sequence] [FILE]...
zzat -l | --list
zzat -h | --help
zzat -V | --version

The zzat 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.

zzat is primarily used as a debugging tool for zzuf, because it can emulate different programs' ways to read files.

Equivalent to -vET.
Number nonempty output lines.
Output debugging information.
Equivalent to -vET.
Display $ at end of each line.
Number all output lines.
Concatenate all files loops times.
Equivalent to -vT.
Display TAB characters as ^I.
Use ^ and M- notation, except for LFD and TAB.
Read a file or a stream using the instruction sequence specified in sequence.

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

fread(1,10); feof(1); fread(1,10)

Loops are permitted using the repeat keyword. Again, feof can be used to prematurely break out of a loop:

repeat(10000, fgetc() feof(1))

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

zzat -l

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

repeat(-1, fread(1,32768), feof(1))

Display the list of supported keywords and functions and exit.
Display a short help message and exit.
Output version information and exit.

Read the first 1000 bytes of f, then exit:

zzat -x 'fread(1,1000)' f

Read the first four bytes of f, using four different instructions:

zzat -x 'getc(),fgetc(),getc_unlocked(),_IO_getc()' f

Read f entirely, by calling getc() repeatedly until end-of-file is reached:

zzat -x 'repeat(-1, getc(), feof(1))' f

Read f entirely, in chunks of 32768 bytes until end-of-file is reached:

zzat -x 'repeat(-1, fread(1,32768), feof(1))' f

zzuf(3), libzzuf(3)

Copyright © 2002-2015 Sam Hocevar <sam@hocevar.net>.

zzat 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 http://www.wtfpl.net/ for more details.

zzuf's webpage can be found at http://caca.zoy.org/wiki/zzuf. An overview of the architecture and inner works is at http://caca.zoy.org/wiki/zzuf/internals.

2015-01-06 zzat 0.15