Replace text "YES" with text "NO" everywhere in both file1 and file2.
Replacing Text using Sed:
sed -i[EXTENSION] [--follow-symlinks] 's/FROM/TO/g' FILE...
If EXTENSION is present, make a backup first by renaming each file FILE to file FILEEXTENSION.
If --follow-symlinks present, and a file is a symbolic link, follow the link and create the backup in the same directory as the real file, i.e. preserve the symbolic link.
Replace text "FROM" with text "TO" everywhere in every FILE.
Pros: Handles multiple files. FROM can be a regular expression.
Cons: May not handle symbolic links the way you want to: If --follow-symlinks not present, symbolic links will get moved, and the new file will not be a symbolic link. If --follow-symlinks present, backup files will get created in the same directory as where the target of the link resides.
Caveats: Will destroy symbolic links if either --follow-symlinks or EXTENSION not present. Sed doesn’t replace overlapping patterns.