将文本链接转换为html超链接

将文本链接转换为html超链接,html,text,Html,Text,我正在尝试创建一个脚本,其中搜索中找到的所有文件都将转换为href链接并重定向到html文件 假设我正在搜索“word”,它会给出以下点击: /archive/here/is/the/first/found/file1.txt /archive/here/is/the/second/found/file2.txt /archive/here/is/the/third/found/file3.txt 我想重定向这些点击并将其转换为包含以下内容的文件“hits.html”: <a href=

我正在尝试创建一个脚本,其中搜索中找到的所有文件都将转换为href链接并重定向到html文件

假设我正在搜索“word”,它会给出以下点击:

/archive/here/is/the/first/found/file1.txt
/archive/here/is/the/second/found/file2.txt
/archive/here/is/the/third/found/file3.txt
我想重定向这些点击并将其转换为包含以下内容的文件“hits.html”:

<a href="/archive/here/is/the/first/found/file1.txt">file1.txt</a>
<a href="/archive/here/is/the/second/found/file2.txt">file2.txt</a>
<a href="/archive/here/is/the/third/found/file3.txt">file3.txt</a>

这可以做到(以一种不太复杂的方式)吗


我尝试了latex2html,但没有成功。

您正在编写脚本-使用什么语言?写入“正在消失”的超链接-StackOverflow允许您的问题包含在内。你应该读一下,或者看看#/bin/bash cat word.txt |(在读取行时;执行A=
echo$line
;B=
echo$A | awk-F”/“{print$NF}”
;echo”“>>hits.html;完成;)退出0