Replace text with filename

Hi,

I have a few thousand files, each contains the word "hello". Would it be possible to do a batch job that replaces the word hello with the filename?

Thanks.

for file in *
do
  sed "s|hello|$file|" "$file" > tempfile$$ &&
   mv tempfile$$ "$file"
done

Thanks, worked like a charm.