sedam − stream interface to edam
sedam [ -n ] [ -e script ] [ -f sfile ] [ -- ] [ file ... ]
Sedam copies the named files (standard input default) to the standard output, edited by a script of edam commands (q.v.). When the script starts, the entire input is selected. The -f option causes the script to be taken from file sfile. If there is a -e option and no -f, the flag -e may be omitted. The -n option suppresses the default output. The -- option signals the end of the commandline options. All following arguments are filenames.
sedam -n ,10p file
Print first 10 lines of file.
sedam ’y/[a-zA-Z]+/ c/\n/’ *.ms
Print one word per line.
sedam ’s/\n\n+/\n/g’
Delete empty lines from standard input.
sedam ’s/UNIX/& system/g’
Replace every instance of by
sedam ’y/[a-zA-Z]+/ c/\n/’ | grep . | sort | uniq -c
Count frequency of words read from standard input.
sed(1), edam((1)), regexp((7))
Rob Pike, ‘‘The text editor sam’’.
Sedam consumes all of standard input before running the script.