November 1998
Beginner
368 pages
7h 58m
English
Another handy command you can use is sed, which lets you make multiple changes to files, without ever opening an editor. For example, as a new Webmaster, you might use sed to change all occurrences of the previous Webmaster's e-mail address to your own, as shown in our example below. As we'll show in this section, you can use sed to make global changes within documents.
To make global changes with sed:
sed /oldaddr@raycomm.com → /newaddr@raycomm.com/g address.htm → > address.htm
/the text you want to replace (/oldaddr@raycomm.com)
A slash (/)
The replacement text (newaddr@raycomm.com)
Another /
g, which tells UNIX to apply the change globally. (If you omit the g, only the first occurrence on each ...
Read now
Unlock full access