Requirements:
Find a batch of HTML files from the current directory and use an HTML file to express their addresses with hyperlink so that other pages can be accessed through this page in the browser.
1. Find.-INAME "* Valid *. *"> valid.txt
Then the file name exists in the following format:
/ValidityState-002.html
/ValidityState-customError-expected.txt
/ValidityState-customError.html
/ValidityState-patternMismatch-expected.txt
/ValidityState-patternMismatch-unsupported-expected.txt
/ValidityState-patternMismatch-unsupported.html
/ValidityState-patternMismatch.html
/ValidityState-rangeOverflow-expected.txt
/ValidityState-rangeOverflow.html
...
2. The Form I want is:
<A href =/ValidityState-002.html>./ValidityState-002.html </a>
...
Solution:
A. Cat valid | while read line; do echo "$ line> $ line"> vv.html; done
B. VI vv.html
At this point the file content such as "href =./ValidityState-002.html>./ValidityState-002.html", to add the <A> label at the beginning and end of each line, fortunately there is a VI command
C. Add the "<a href =" Vim command: % S/^/<a href = "to each line.
D. Add the "</a>" Vim command at the end of each line: % S/$/<\/A>