DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Manipulating text with sed

The transform function

The transform function (y) takes two strings as arguments. It turns each instance of the first character in string 1 into the first character in string 2, then the second character in string 1 into the second character in string 2, and so on. In the following example, ``a'' is transformed into ``A'', irrespective of whether it is followed by ``b'':

y/abcde/ABCDE/

The components of the two strings are literals, and the transformation performed depends on position. As with the substitute command, y takes an optional address as an argument:

15y/abcde/ABCDE/


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004