aboutsummaryrefslogtreecommitdiff
path: root/man/man1/ssam.1
diff options
context:
space:
mode:
authorJason Catena <jason.catena@gmail.com>2009-09-15 19:23:37 -0400
committerJason Catena <jason.catena@gmail.com>2009-09-15 19:23:37 -0400
commit16e65a6d780d182ae8c1992a23952c567468a01c (patch)
tree16dfca55efd5c03ee9cf7e390cfa6a9a1b010f4a /man/man1/ssam.1
parent50281180685522b19f39ed6b36a4983f81c5e300 (diff)
downloadplan9port-16e65a6d780d182ae8c1992a23952c567468a01c.tar.gz
plan9port-16e65a6d780d182ae8c1992a23952c567468a01c.tar.bz2
plan9port-16e65a6d780d182ae8c1992a23952c567468a01c.zip
ssam(1): new command
http://codereview.appspot.com/95076
Diffstat (limited to 'man/man1/ssam.1')
-rwxr-xr-xman/man1/ssam.172
1 files changed, 72 insertions, 0 deletions
diff --git a/man/man1/ssam.1 b/man/man1/ssam.1
new file mode 100755
index 00000000..6dbdc236
--- /dev/null
+++ b/man/man1/ssam.1
@@ -0,0 +1,72 @@
+.TH SSAM 1
+.SH NAME
+ssam \- stream interface to sam
+.SH SYNOPSIS
+.B ssam
+[
+.B -n
+]
+[
+.B -e
+.I script
+]
+[
+.B -f
+.I sfile
+]
+[
+.I file ...
+]
+.SH DESCRIPTION
+.I Ssam
+copies the named
+.I files
+(standard input default) to the standard output, edited by a script of
+.IR sam
+commands (q.v.).
+When the script starts, the entire input is selected.
+The
+.B -f
+option causes the script to be taken from file
+.IR sfile .
+If there is a
+.B -e
+option and no
+.BR -f ,
+the flag
+.B -e
+may be omitted.
+The
+.B -n
+option suppresses the default output.
+.ne 4
+.SH EXAMPLES
+.TP
+.B ssam -n ,10p file
+Print first 10 lines of file.
+.TP
+.B ssam 'y/[a-zA-Z]+/ c/\en/' *.ms
+Print one word per line.
+.TP
+.B ssam 's/\en\en+/\en/g'
+Delete empty lines from standard input.
+.TP
+.B ssam 's/UNIX/& system/g'
+Replace every instance of
+.L UNIX
+by
+.LR "UNIX system" .
+.TP
+.B ssam 'y/[a-zA-Z]+/ c/\en/' | grep . | sort | uniq -c
+Count frequency of words read from standard input.
+.SH SOURCE
+.B \*9/bin/ssam
+.SH SEE ALSO
+.IR sed (1),
+.IR sam (1),
+.IR regexp (7)
+.PP
+Rob Pike,
+``The text editor sam''.
+.SH BUGS
+Ssam consumes all of standard input before running the script.