home *** CD-ROM | disk | FTP | other *** search
-
-
- #####
- # # ## #####
- # # # #
- # # # #
- # ###### #
- # # # # #
- ##### # # #
-
-
-
-
- You can get part of the following documentation by invoking the program with
- the switches -v, -h, or -H . See README.TXT for more information.
-
- ----------------------------------- -v ------------------------------------
- CAT v1.0 -- Copy files to stdout
- Copr (c) 1992,1993 Richard Breuer. CAT is freeware. No warranties.
-
- This is CAT/2 v1.0 - renamed to CAT (from RUTILS 4).
-
- Author: Richard Breuer
- Brunssumstrasse 6
- 5100 Aachen
- (after Jul 1, 1993: 52074 Aachen)
- Germany
- Europe
-
- Phone: +49/241/85605
- Fax: +49/241/8021329
-
- Email: ricki@pool.informatik.rwth-aachen.de (Preferred!)
-
- ----------------------------------- -h ------------------------------------
- CAT v1.0 -- Copy files to stdout
- Copr (c) 1992,1993 Richard Breuer. CAT is freeware. No warranties.
-
- Usage:
- CAT [-bcCehHnstv*] infile.. [{>|>>} outfile]
-
- Options (-n overrides -b; -c excludes -bCent):
- -b Number the lines as -n, but omit the line numbers from blank lines
- -c Binary copy mode. CAT creates an exact copy of the input files
- -C Text copy mode. CAT treats input and output files as text files
- -e Mark each line end with a $
- -h Display this help screen
- -H Display another help screen with notes and examples
- -n Precede each line output with its line number
- -s Suppress warnings about files which cannot be opened
- -t Display non-printable characters including <TAB>
- -v Display version info and information about the author
- -* Display internal information (for debugging purposes)
-
- ----------------------------------- -H ------------------------------------
- CAT v1.0 -- Copy files to stdout
- Copr (c) 1992,1993 Richard Breuer. CAT is freeware. No warranties.
-
- Notes:
- CAT reads from stdin if a filename is -. The output is always directed
- to stdout. The errorlevel is set to 1 if help has been displayed. It is set
- to 255 in case of an error and 0 on normal completion. Output resulting from
- multiple input files is appended to stdout. The processing order for wild-
- cards depends on the order of the directory entries. CAT does work for
- binary files. In text mode lines longer than 255 characters are truncated.
- CAT uses binary mode whenever the output is redirected to a file, other-
- wise it uses text mode. You may override this behaviour with -C and -c.
-
- Examples:
- CAT *.TXT -
- Process all *.TXT files in the current directory and append them to
- stdout. The order is the one DOS's dir tells you. After that read further
- input from the command line until EOF = Ctrl/Z is detected.
- DIR | CAT -n
- Displays the directory with line numbers.
- CAT COMMAND.COM > A:COMMAND.COM
- A rather unconventional way to copy COMMAND.COM to drive A: :-)
-
- -------------------------------------------------------------------------------
- Additional information:
- CAT is a re-implementation of the Unix command with the same name. There are
- some differences, though.
-
- CAT knows two modes of operation: text and binary mode. Text mode is suitable
- for ASCII files, in which lines are separated with <CR><LF> and whose line
- length is shorter than 256 characters. Binary mode is suitable for arbitrary
- files. The reason why CAT distinguishes between them is that CAT cannot
- block-write on the console.
-
- I tried to make the way CAT switches between text and binary mode as clear
- as possible. The easiest explanation of how CAT behaves is: As you expect it
- to :-), or at least I hope so. The detailed description is this:
-
- - if -c is specified, binary mode is used, otherwise
- - if at least one of -b, -C, -e, -n, or -t is specified, text mode is
- used (because these options only make sense for text files), otherwise
- - if the output is redirected to a file, binary mode is used, otherwise
- text mode is used
-
- Note that -c excludes -b, -C, -e, -n, and -t.
-
- Examples (imagine <FF> to be CHR(12)):
- CAT FOO.DAT { normal (text) CAT }
- > This is an example<
- >text with TABs and<
- ><FF>form feed.<
- ><
- >^^^ empty line<
-
- CAT -n FOO.DAT { (text) CAT with line numbers }
- > 1 This is an example<
- > 2 text with TABs and<
- > 3 <FF>form feed.<
- > 4<
- > 5 ^^^ empty line<
-
- CAT -b FOO.DAT { as CAT -n, omitting empty lines }
- > 1 This is an example<
- > 2 text with TABs and<
- > 3 <FF>form feed.<
- ><
- > 5 ^^^ empty line<
-
- CAT -e FOO.DAT { (text) CAT, marking line ends with $ }
- > This is an example$<
- >text with TABs and$<
- ><FF>form feed.$<
- >$<
- >^^^ empty line$<
-
- CAT -t FOO.DAT { (text) CAT, with printable representations
- of non-printable characters }
- >^IThis is an example<
- >text with TABs and<
- >^Lform feed.<
- ><
- >^^^ empty line<
-
- Now some examples for binary CAT. The result cannot be included here, because
- the files are assumed to be not readable:
-
- CAT -c FOO.DAT { (binary) CAT to the console. This will
- likely produce an error message }
-
- CAT \COMMAND.COM > FOO.COM { (binary) CAT, copies COMMAND.COM to FOO.COM,
- which is an exact copy of COMMAND.COM }
-
- CAT A B C > D { (binary) CAT, appending A+B+C to D }
-