Subject: ssam , man page

From: Bengt Kleberg <[email-masked]>
Date: Wed, 1 Mar 2000 10:04:28 -0500

.TH SSAM 1 "2000-01-01"
.SH NAME
ssam \- stream editor
.SH SYNOPSIS
.B ssam
.RB [ \-n ]
.RB [ \-e
.IR script ]
.RB [ \-f
.IR sfile ]
.RB [ \-\- ]
.RB [ script ]
.RI [ file " ..." ]
.SH DESCRIPTION
.I ssam
pretends to be a stream version of
.IR sam (1).
.PP
It saves all input, stdin and files, into a single file and then uses sam \-d to edit this file.
So, despite the name, it is not a stream editor.
But it does allow for text to be piped into it and edited with the editing commands used in sam.
This is useful if one is spending most of ones time in
.IR wily (1),
instead of sam.
.PP
A single editing script may be specified as the last argument to ssam, before any subsequent files.
Multiple editing scripts may be specified by using the -e or -f options.
All editing scripts are applied to the input in the order they are specified.
.SS Editing scripts
Editing scripts are made from the commands described in
.IR sam (1).
.SH OPTIONS
.TP
.B \-n
By default, all input is echoed to the standard output
after all of the commands have been applied to it. The \-n option
suppresses this behavior.
.TP
.B \-e " script"
Append the editing script specified by the script argument to
the list of editing scripts.
.TP
.B \-e " sfile"
Append the editing scripts found in the file sfile to the
list of editing scripts.
.TP
.B \-\-
One can use the special argument \-\- to terminate the options.
This allows the use of file names beginning with a dash.
.SH ENVIRONMENTAL VARIABLES
.TP
.B TMPDIR
The location used to store temporary files.
If not set, /tmp is used.
.SH FILES
.TP
.B  /tmp/ssam.$pid.XXXXXXXX
The file used to store all of the text to be edited.
On systems that has
.IR mktemp (1),
(eg OpenBSD), this utility is used to further randomize the file name.
.SH SEE ALSO
.IR sam (1),
.IR wily (1),
.IR rc (1),
.IR mktemp (1).
.SH BUGS
.PP
Despite its name this is not a stream editor.
It saves all input, stdin and files, into a single file and then uses sam \-d to edit this file.
Since sam itself makes a copy of the file to be edited
this means that there are 2 copies of all of the text.
Ssam is clearly of no help if problems with disk space stops the use of sam.
.PP
Ssam is not written in
.IR sh (1).
Instead it uses
.IR rc (1).
This is actually more of a feature than a bug.
Most sam users already have rc. If not, get it from http://www.star.le.ac.uk/~tjg/rc/.