% log.tex  93.07.29
% man commands log .
% Copyright 1983-1992   Albert Davis
%------------------------------------------------------------------------
\section{{\tt LOg} command}
\index{log command}
\index{batch mode}
\index{files}
\index{disk files}
\index{command record}
\index{record of commands}
\index{i-o redirection}
\index{redirection: i-o}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt LOg} {\it file}\\
{\tt LOg >>} {\it file}\\
{\tt LOg}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Saves a copy of your keyboard entries in a disk file, which may be used as
input for the `{\tt <}' command, or to run in batch mode.
%------------------------------------------------------------------------
\subsection{Comments}

The `{\tt >>}' option appends to an existing file, if it exists, otherwise it
creates one.

Files can be nested.  If you open one while another is already open, both
will contain all the information.

A bare {\tt LOg} closes the file.  Because of this, the last line of this
file is always {\tt LOg}.  Ordinarily, this will not be of any consequence,
but if a log file is open when you use this file as command input, this will
close it.  If more than one {\tt LOg} file is open, they will be closed in
the reverse of the order in which they were opened, maintaining nesting.

See also: `{\tt >}' and `{\tt <}' commands.
%------------------------------------------------------------------------
\subsection{Bugs}

On MS-DOS systems, {\bf do not change disks when this file is open.}
Changing disks may cause a total non-recoverable loss of all information on
the disk.  This is characteristic of MS-DOS.

The file is an exact copy of what you type, so it is suitable for
{\tt acs <file} from the shell.  It is NOT suitable for the {\tt <}
command in acs or the Spice-like mode {\tt acs file} without {\tt <}.
%------------------------------------------------------------------------
\subsection{Examples}

\begin{description}

\item[{\tt log today}] Save the commands in a file {\tt today} in the
current directory.  If {\tt today} already exists, the old one is gone.

\item[{\tt log >> doit}] Save the commands in a file {\tt doit}.  If
{\tt doit} already exists, it is kept, and the new data is added to the
end.

\item[{\tt log runit.bat}] Use the file {\tt runit.bat}.

\item[{\tt log}] Close the file.  Stop saving.

\end{description}
%------------------------------------------------------------------------
%------------------------------------------------------------------------
