# sum.sed -- summary of sed(1) commands # # $Id$ # Carlos Duarte , 980628 . in parenteses, are the number of addresses the command takes, either: 0 - no address, just the cmd per se 1 - one address, optional; RE or a line number, is accepted 2 - two addresses, both optional; any permutation of `RE,line', is accepted Edition with inline text (1)i insert text (1)a append text (2)c change text Editions on pattern space (2)s/RE/replacement/[gp1-9w] substitute matched RE, per `replacement' (2)y/list1/list2/ translates each character on `list1' into `list2' File interaction (1)r file read contents of `file' (2)w file write to `file' Flow control (0): label set `label' (2)b label branch to `label' (2)t label branch to `label' iff a previous substitution was done (1)q quit (2)! cmd don't apply `cmd' on specified addresses (2){ group commands } end grouping Line oriented editing (2)p print pattern space (2)l print, but show special characters in format \x (1)= display current input line number (last read) (2)n fetch next line into pattern space (2)d delete pattern space Multi-line support (2)h copy pattern space to hold buffer (2)H append pattern space on hold buffer (2)g copy hold area into pattern space (get) (2)G append into pattern space contents of hold area (2)x exchange hold buffer with pattern space (2)N append next line of input to pattern space (2)P print first line of pattern space (2)D delete first line of pattern space Others (0)# comment