Hello every one.
I try to do some thing with
sed and
| redirection i know it's possible but couldn't manage to done it.
Here is the problem:
I have 1 file
template.htm whith a variable "
XXX" in it. The file look like this:
Code:
<html>
<head>
<title>Download XXX on this page.</title>
</head>
<body>
bla bla XXX.zip
</body>
</html>
and a list of file in a test file let say
list.txt this file look like this:
Code:
File1.zip.htm
File2.zip.htm
File3.zip.htm
and i'm looking for a command line to copie the file
template.htm to each name file in list.txt
File1.zip.htm, File2.zip.htm, etc... and replace the variable "
XXX" by the name of the file without the extention .zip.html
so the
File1.zip.htm would look like this:
Code:
<html>
<head>
<title>Download File1 on this page.</title>
</head>
<body>
bla bla File1.zip
</body>
</html>
I've try alot of thing with cat and sed command but no clue.
any lead would by very appreciate.
Thanks