aboutsummaryrefslogtreecommitdiff
path: root/man/man1/ssam.1
blob: 17a105aa5eb1596189e6ce12f9e24d1ab7afeca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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), 
.IM sam (1) ,
.IM regexp (7)
.PP
Rob Pike,
``The text editor sam''.
.SH BUGS
Ssam consumes all of standard input before running the script.