Script to generate a html file with link to all files in directory

ls -1 |awk -F\”.\” \'{print  \”<p><a href=\”\”,$_,\”\”> \”,$2,\”.\”,$3,\” </a></p>\” ;}\’ > index1.html

And if you want to do it recursively

ls -1R |awk -F\”.\” \'{print  \”<p><a href=\”\”,$_,\”\”> \”,$2,\”.\”,$3,\” </a></p>\” ;}\’ > index1.html