

scat                         Command                         scat




Print text files one screenful at a time

ssccaatt [ [_o_p_t_i_o_n ...] [_f_i_l_e ...] ] ...

scat prints  each file on the standard  output, one screenful (24
lines)  at a  time if  the output  is a  screen.  scat  reads and
prints the standard inputif no file is named.

The text  is processed to  allow convenient viewing  on a screen;
the options described  below select the nature of the processing.
Options begin with `-' and may be interspersed with file names.

scat scans two argument lists.  The first is in the environmental
SCAT.  It  should consist of  arguments separated by  white space
(space,  tab, or  newline characters), with  no quoting  or shell
metacharacters.  This  string is a useful  place to set terminal-
dependent parameters (such as page width and length) and to place
invocation lists  (see below).  The second  argument list is sup-
plied on the command line.

scat recognizes the following options:

-11   Do not stop at EOF  if exactly one file was specified on the
     command line.

-bb_n  Begin output at input line n.

-cc   Represent  all control characters  unambiguously.  With this
     option, scat prints control characters in the range 0-037 as
     a character in the  range 0100-0137 prefixed by a carat `^';
     for  example, SOH  appears as  ``^A'' and  DEL as  ``^?'' It
     prints  mark-parity characters (in  the range  of 0200-0377)
     with  `~'; for  example, mark-parity `A'  and SOH  appear as
     ``~A''  and  ``~^A'', respectively.   It  also prefixes  the
     characters `^', `~', and  `\' with a `\'.  This option over-
     rides the option -t.

-ccss  Like -c, but map space  ` ' to underscore `_' and prefix un-
     derscore `_' with `\'.

-cctt  Like -c, but map tabs to spaces, not ``^I''.

-ii_n   Shift the  display  window right  n columns  into the  text
     field.  This is useful for viewing long lines.

-ll_n  Set the display window length to n lines.  The default is 24
     normally, 34 for the Tek 4012.

-nn   Number input lines; wrapped lines are not numbered.

-rr   Remote; the output is not paged.

-ss   Skip empty lines.



COHERENT Lexicon                                           Page 1




scat                         Command                         scat



-SS_n  Seek n bytes into input before processing.

-tt   Truncate  long lines.  Normally, scat  wraps each long line,
     with the interrupted portion delimited by a `\'.

-ww_n  Set  the display window width to n  columns.  The default is
     80 normally, 72 for the Tek 4012.

-xx   Expand tabs.

-. _s_u_f_f_i_x
     Invoke  options by  file-name suffix.  If  a file  name ends
     with .suffix, then  scat scans the argument sublist starting
     immediately after the invocation flag.  New options will ap-
     ply to  the invoking file only.  A  sublist is terminated by
     the end of the argument list,  by a file name, by the ``--''
     flag, or by another ``-.'' (invocation lists do not nest).

--   Terminate a sublist (see previous option).

Numbers may begin with 0 to indicate octal, and may end in b or k
to be scaled by 512 or 1,024, respectively.

If the  output is  being paged, scat  waits for a  user response,
which may be one of the following:


     nneewwlliinnee Display next page
     /       Display next half-page
     ssppaaccee   Display next line
     ff       Print current file name and line number
     nn       ssccaatt next file
     qq       Quit


***** Example *****

The following shows how to use the environment argument list, in-
vocation lists, and sublists:


SCAT="-l24 -.c -n -.s -b5"
export SCAT
scat *.c *.s


After processing the  SCAT argument list, scat processes the com-
mand line  argument list ``*.cc  *.ss'' with the page  length at 24
lines.  If  a file is a  C source (``*.cc'') the  invoke option in
the SCAT argument list numbers the output lines.  If a file is an
assembly source (``*.ss'') scat skips the first four lines.

***** See Also *****

cat, commands, pr


COHERENT Lexicon                                           Page 2




scat                         Command                         scat




























































COHERENT Lexicon                                           Page 3


