9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

ssam.1 (1132B)


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