dir2html - Directory listing to HTML
This is a simple script that creates an html file of a directory with links to every file on it. This is my first bash script so it may not be the most efficient way to do it. It is very simple but it gave me work for a few hours, this link was very helpful on how to delimit the find and replace options of sed the right way.
To run the script just set the correct permissions and run it:
$ chmod u+rx dir2html.sh
$ ./dir2html.sh directory
That will create an index.html file on directory.
You can see how the directory listing looks on the downloads page: www.somekindofpaper.info/downloads.
Download: dir2html.sh
Feel free to use and modify it to meet your needs.
0 comments
