Replace all the occurrences of a string with a replacement in the supplied files.
- perl -pi -w -e 's/search/replace/g;' files
- -e means execute the following line of code.
- -i means edit in-place
- -w write warnings
- -p loop
- perl -pi -w -e 's/today/tomorrow/g;' dates*.txt
You need to login to post a comment.