next up previous contents
Next: ``c" Change Line Up: ``ed" Editor Previous: Finding a Pattern   Contents

``s" Substitute

To substitute a string for another, the format is
[line_b[,line_e]]s/string_1/ string_2/
where line_b and line_e are the range of the operation, and string_1 and string_2 are the string-to-be-replaced and new-string respectively.

For example, to substitute the word mine for his on the first fifteen lines of the document, use

1,15s/mine/his/



Claude Cantin 2010-10-24