Working within a directory of two thousand plus of text files, I need to replace a certain string in each of those text files from "template.cmp" into "actualfilename". For example, for a file like mdgen.cmp, I need the original string of "template.cmp" to be changed to "mdgen".
I have tried the following command to no avail:
sed -i 's/template.cmp/$(basename)' ./*
Any idea how I can get around this?