Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cat(1) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

head(1)

more(1)

pg(1)

pr(1)

tail(1)



     cat(1)                     DG/UX 4.30                      cat(1)



     NAME
          cat - concatenate and type files to standard output

     SYNTAX
          cat [ -u ] [ -s ] [ -v [-t] [-e] ] file ...

     DESCRIPTION
          Cat reads each file (from left to right) and writes it on
          the standard output.  Thus:

               cat file

          prints the file on the screen, and:

               cat file1 file2 >file3

          concatenates the first two files and places the result on
          the third.

          If no input file is given, or if the argument - is
          encountered, cat reads from the standard input file.

          Options are:

          -u      Unbuffered output. The output is buffered unless you
                  give this option.

          -s      Be silent about non-existent files; no error message
                  is given.

          -v      Visible printing of nonprinting characters (except
                  tabs, newlines and form-feeds).  Control characters
                  are printed ^X (control-x); the DEL character (octal
                  0177) is printed ^?.  Non-ASCII characters (with the
                  high bit set) are printed as M-x, where x is the
                  character specified by the seven low-order bits.
                  The option -v must be present for the -t and -e
                  switches to work.

          -t      Print tabs as ^I's, but only if the -v switch is
                  also present. Otherwise, it is ignored.

          -e      Print a $ character at the end of each line (prior
                  to the newline), but only if the -v switch is also
                  invoked. Otherwise, it is ignored.










     Licensed material--property of copyright holder(s)         Page 1





     cat(1)                     DG/UX 4.30                      cat(1)



     EXAMPLES
          $ cat file1

               The
               quick
               brown
               fox

          $ cat file2

               jumped
               over
               the
               lazy
               dog.

          $ cat file1 file2 > file3
          $ cat file3

               The
               quick
               brown
               fox
               jumped
               over
               the
               lazy
               dog.

          The above example shows the concatenation of two different
          files into one file.

     HINTS
          When the standard input is the keyboard and the standard
          output is the screen, cat prints back each line as you enter
          it (the newline character and all other special characters
          cannot be escaped.  Cat does not interpret characters).

          Using cat >file1 is a good way to create short files
          quickly.  Type ^d (control-d) to end input to the file.

     WARNING
          Sh(1) creates and/or opens the files for the output of the
          cat command before reading the files for its input.
          Therefore, command formats such as
               cat file1 file2 >file1
          will cause the original data in file1 to be lost; take care
          when using the shell special characters to specify files for
          cat to use.

     SEE ALSO
          cp(1), head(1), more(1), pg(1), pr(1), tail(1).



     Licensed material--property of copyright holder(s)         Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026