Command
to search and replace a word in a file:
sed -i 's/original word/word
to replace/g' filename
Command to search and replace
a word in all of the files in a directory:
grep -rl 'original word'
path_of_the_directory | xargs sed -i 's/original word/word to replace/g'
No comments:
Post a Comment