Friday, December 24, 2010

Export HTML List of Links With Bash/Unix/Cygwin

Why use an IDE when you can have fun with the Shell??? This little tidbit will rip through the files in the current directory and redirect the output with hyperlink wrappers to a file named links.html.

for file in *;
do
echo "<li><a href=\"$file\">$file</a></li>" >> links.html;
done

No comments:

Post a Comment