I have a large number of files which contain text. All files contain the word replace (no quotes). I would like to replace that word with the name of the file.Example, filename is:  On Time.txtReplace the word replace (no quotes) with On Time (no quotes).Sorry, I'm not very sharp with scripts, so I need spoon-feeding...Cheers,Robert
Find and replace with filename
find;replace
for filename in On time.txt ; do  replacement=$(echo $filename | sed -e 's,^.*/,,' -e 's,\.[^\.]*$,,')  [ -f $filename ] && sed -i s,replace,$replacement, $filenamedoneTo do all files in your directory, replace On time.txt with * like this:for filename in * ; doNote that here filenames must not contain commas (you can choose the character so that it does not appear in your filenames).