Replace text patterns in files.