GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ZZCAT (1)

NAME

zzcat - concatenate files using different instruction sequences

CONTENTS

Synopsis
Description
Options
Examples
See Also
Author

SYNOPSIS

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

DESCRIPTION

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

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

OPTIONS

-A, --show-all
  Equivalent to -vET.
-b, --number-nonblank
  Number nonempty output lines.
-d, --debug
  Output debugging information.
-e Equivalent to -vET.
-E, --show-ends
  Display $ at end of each line.
-n, --number
  Number all output lines.
-r, --repeat=loops
  Concatenate all files loops times.
-t Equivalent to -vT.
-T, --show-tabs
  Display TAB characters as ^I.
-v, --show-nonprinting
  Use ^ and M- notation, except for LFD and TAB.
-x, --execute=sequence
  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:

zzcat -l

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

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

-l, --list Display the list of supported keywords and functions and exit.
-h, --help Display a short help message and exit.
-V, --version
  Output version information and exit.

EXAMPLES

Read the first 1000 bytes of f, then exit:

zzcat -x \(aqfread(1,1000)\(aq f

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

zzcat -x \(aqgetc(),fgetc(),getc_unlocked(),_IO_getc()\(aq f

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

zzcat -x \(aqrepeat(-1, getc(), feof(1))\(aq f

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

zzcat -x \(aqrepeat(-1, fread(1,32768), feof(1))\(aq f

SEE ALSO

zzuf(3), libzzuf(3)

AUTHOR

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

zzcat 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 Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING 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.

Search for    or go to Top of page |  Section 1 |  Main Index


zzcat 0.13 ZZCAT (1) 2010-01-07

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.