sed - stream editor.
sed "edit-command" file[s]-to-be-edited > edited-file
If you have a file in which you want to change all occurrences of dogs to hounds and all occurrences of cats to dogs. If you change the cats to dogs 1st and then dogs to hounds, the cats will also become hounds. So do the dogs to hounds 1st. |