Is it possible to replace a certain phrase in the content of multiple files with the name of that file?
Eg: I have 3 files. the phrase i want to replace inside each file content is “facebook”. i want to replace it with the filename at all occurrences. Is it possible? How to do it?
eg: suppose file names are hydrogen.txt, helium.txt, oxygen.txt and all have the following content:
i love facebook. its just great. i love facebook
facebook is awesome.
after the operation, the file “hydrogen.txt” will have the following content
i love hrdrogen. its just great. i love hydrogen
hydrogen is awesome.
number of file i have is actually over a 100