Blame


1 16e65a6d 2009-09-15 jason.cat .TH SSAM 1
2 16e65a6d 2009-09-15 jason.cat .SH NAME
3 16e65a6d 2009-09-15 jason.cat ssam \- stream interface to sam
4 16e65a6d 2009-09-15 jason.cat .SH SYNOPSIS
5 16e65a6d 2009-09-15 jason.cat .B ssam
6 16e65a6d 2009-09-15 jason.cat [
7 16e65a6d 2009-09-15 jason.cat .B -n
8 16e65a6d 2009-09-15 jason.cat ]
9 16e65a6d 2009-09-15 jason.cat [
10 16e65a6d 2009-09-15 jason.cat .B -e
11 16e65a6d 2009-09-15 jason.cat .I script
12 16e65a6d 2009-09-15 jason.cat ]
13 16e65a6d 2009-09-15 jason.cat [
14 16e65a6d 2009-09-15 jason.cat .B -f
15 16e65a6d 2009-09-15 jason.cat .I sfile
16 16e65a6d 2009-09-15 jason.cat ]
17 16e65a6d 2009-09-15 jason.cat [
18 16e65a6d 2009-09-15 jason.cat .I file ...
19 16e65a6d 2009-09-15 jason.cat ]
20 16e65a6d 2009-09-15 jason.cat .SH DESCRIPTION
21 16e65a6d 2009-09-15 jason.cat .I Ssam
22 16e65a6d 2009-09-15 jason.cat copies the named
23 16e65a6d 2009-09-15 jason.cat .I files
24 16e65a6d 2009-09-15 jason.cat (standard input default) to the standard output, edited by a script of
25 16e65a6d 2009-09-15 jason.cat .IR sam
26 16e65a6d 2009-09-15 jason.cat commands (q.v.).
27 16e65a6d 2009-09-15 jason.cat When the script starts, the entire input is selected.
28 16e65a6d 2009-09-15 jason.cat The
29 16e65a6d 2009-09-15 jason.cat .B -f
30 16e65a6d 2009-09-15 jason.cat option causes the script to be taken from file
31 16e65a6d 2009-09-15 jason.cat .IR sfile .
32 16e65a6d 2009-09-15 jason.cat If there is a
33 16e65a6d 2009-09-15 jason.cat .B -e
34 16e65a6d 2009-09-15 jason.cat option and no
35 16e65a6d 2009-09-15 jason.cat .BR -f ,
36 16e65a6d 2009-09-15 jason.cat the flag
37 16e65a6d 2009-09-15 jason.cat .B -e
38 16e65a6d 2009-09-15 jason.cat may be omitted.
39 16e65a6d 2009-09-15 jason.cat The
40 16e65a6d 2009-09-15 jason.cat .B -n
41 16e65a6d 2009-09-15 jason.cat option suppresses the default output.
42 16e65a6d 2009-09-15 jason.cat .ne 4
43 16e65a6d 2009-09-15 jason.cat .SH EXAMPLES
44 16e65a6d 2009-09-15 jason.cat .TP
45 16e65a6d 2009-09-15 jason.cat .B ssam -n ,10p file
46 16e65a6d 2009-09-15 jason.cat Print first 10 lines of file.
47 16e65a6d 2009-09-15 jason.cat .TP
48 16e65a6d 2009-09-15 jason.cat .B ssam 'y/[a-zA-Z]+/ c/\en/' *.ms
49 16e65a6d 2009-09-15 jason.cat Print one word per line.
50 16e65a6d 2009-09-15 jason.cat .TP
51 16e65a6d 2009-09-15 jason.cat .B ssam 's/\en\en+/\en/g'
52 16e65a6d 2009-09-15 jason.cat Delete empty lines from standard input.
53 16e65a6d 2009-09-15 jason.cat .TP
54 16e65a6d 2009-09-15 jason.cat .B ssam 's/UNIX/& system/g'
55 16e65a6d 2009-09-15 jason.cat Replace every instance of
56 16e65a6d 2009-09-15 jason.cat .L UNIX
57 16e65a6d 2009-09-15 jason.cat by
58 16e65a6d 2009-09-15 jason.cat .LR "UNIX system" .
59 16e65a6d 2009-09-15 jason.cat .TP
60 16e65a6d 2009-09-15 jason.cat .B ssam 'y/[a-zA-Z]+/ c/\en/' | grep . | sort | uniq -c
61 16e65a6d 2009-09-15 jason.cat Count frequency of words read from standard input.
62 16e65a6d 2009-09-15 jason.cat .SH SOURCE
63 16e65a6d 2009-09-15 jason.cat .B \*9/bin/ssam
64 16e65a6d 2009-09-15 jason.cat .SH SEE ALSO
65 16e65a6d 2009-09-15 jason.cat .IR sed (1),
66 d32deab1 2020-08-16 rsc .MR sam (1) ,
67 d32deab1 2020-08-16 rsc .MR regexp (7)
68 16e65a6d 2009-09-15 jason.cat .PP
69 16e65a6d 2009-09-15 jason.cat Rob Pike,
70 16e65a6d 2009-09-15 jason.cat ``The text editor sam''.
71 16e65a6d 2009-09-15 jason.cat .SH BUGS
72 16e65a6d 2009-09-15 jason.cat Ssam consumes all of standard input before running the script.