I am looking for bash code to replace all <title>XXX</title>
within all .html files to <title>XXX - YYY $Date</title>
What I came up with, using sed is:
sed -i "s/</title>/ - YYY 'date'/g" /home/mirror/*
This however, doesn't implement the .html requirement and I can't get it to work, I'm either getting
sed: no imput files
or
-bash: s/</title>/ - YYY 'date'/g: No such file or directory
The structure is:
/home/mirror/
├── images
├── archive
│ └── index.html
│ └── 2.html
├── index.html
├── 2.html
├── style.css
└── scripts.js
How can I do this?