Nguyễn Thiệu Vy
Member
How do you find and replace a string in multiple files in Linux?
Answer
sed
Answer
sed
- i — replace in file. Remove it for a dry run mode;
- s/search/replace/g — this is the substitution command. The s stands for substitute (i.e. replace), the g instructs the command to replace all occurrences.