DragonFly On-Line Manual Pages

Search: Section:  


SSAM(1)                DragonFly General Commands Manual               SSAM(1)

NAME

ssam - A stream editor with sam command syntax

SYNOPSIS

ssam [-a CollationSequence] [-b] [-f FileOfCommands] [-n] [-w] [-x] [files...]

DESCRIPTION

Ssam(1) is analogous to the stream editor sed(1), but uses the sam command set to provide improved functionality, and is aware of the UTF character set. It uses the UTF-aware regular expression library, ure(3).

FLAGS

A different UTF collation sequence may be sepcified either on the command line by using the -asequencename argument, or by using the UTFCOLLSEQ environment variable. The -b argument specifies that offsets in the output of the '=' command should be given in bytes from the beginning of the file, rather than in UTF characters from the beginning of the file. This is for some compatibility with tools that are not UTF-aware. Please note also that this is solely for output - currently, it's not possible to move to a byte offset in a file, nor is it desirable to do so. Commands may be taken from a file rather than the command line by using the -ffilename argument. The -n argument specifies that output should not be sent to stdout by default. The -v argument prints the version number of ssam on standard output, along with the date ssam was compiled, and the e-mail address for bug reports. The -w argument allows you to update files in place. It was considered dangerous to implement ssam without this argument, as, without it, an unsuspecting user may overwrite files unintentionally. In effect, this argument enables the ssam 'w' command to work. The -x argument shows a simple representation of commands after parsing has taken place. This is mainly for debugging purposes, and there are a few unexpected indentations, especially in address calculation, but has been left in for help in divining why certain commands are executed.

SSAM COMMAND SET

The following sam(1) commands have been implemented in ssam(1): = prints the value (line numbers and character offsets) of dot X /ure/ command run command in each file whose menu line matches ure Y /ure/ command run command in each file whose menu line does not match ure a /text/ append text after dot c /text/ change text in dot d delete text in dot f print menu line of current file g /ure/ command if dot contains a match of ure, run command i /text/ insert text after dot k set address mark to dot m address move text in dot to be after address n print menu lines of all files p print text in dot s /ure/text/ substitute text for match of ure in dot t address copy text in dot to after address v /ure/ command if dot does not contain a match of ure, run command w write file x /ure/ command for each match of ure, set dot and run command y /ure/ command between adjacent matches of ure, set dot and run command { begin a group of commands } end a group of commands

BUGS

Get your buggy software here...

AUTHOR

Conceived and written by Alistair Crooks (agc@uts.amdahl.com, or agc@westley.demon.co.uk). I've since found out that Byron Rakitzis wrote a similar program, with less functionality, called ss, which was based on Henry Spencer's regular expression code. SSAM(1)

Search: Section: