Ansiprint is a utility for printing text files (or stdin) from remote terminals using ANSI telnet escape sequences.
Ansiprint was inspired by the ansiprt.c component of the University of Washington's excellent email package, pine, but has been completely re-written in C++ and includes a variety of new features.
This is free software, released under the BSD license. That means you can do anything whatsoever you want with it, except claim you wrote it.
Here are some key features of "Ansiprint":
· Input from either stdin or text files specified on the command line.
· Can write output either to stdout (default) or to /dev/tty (in case something is trapping stdout).
· Prints a form-feed character to separate multiple files. (Can be disabled by user.)
· Can print a form feed after all pages/files are printed. (Presumed useful with some tractor-feed printers. Disabled by default.)
· User can specify size of read/write buffer.
USAGE: ansiprint [-n] [-t] [-S] [-b< buffersize >] [-f file1 file2 ...]
-n Print a form-feed character after everything else.
-S Do NOT print a form-feed between each separate file specified on
the command line
-t Write output to /dev/tty instead of stdout (in case something is
-b Set the read/write buffer to .
(default = 512 bytes)
Unless '-f' is specified, files on the command line are ignored and stdin is printed. If '-f' is specified, stdin is ignored and the listed files printed.
When multiple files are specified on the command line, a form-feed is printed after each file except the last. This may be turned off with '-S'; then files will only be separated by a line feed.
A form-feed is NOT printed after the last file, unless '-f' is specified. (This is probaby only useful for some tractor-fed printers.)
Ansiprint does not recognize multiple files piped to stdin, and will print them as one big lump.