Perl one line : how to create a html thumb page

Here is a Perl one-line command to create an html thumb page.
Then in the html thumb page you will be able to visualise gifs from a specific directory :

The code :
[pene@donunix] ls -1 *.jpg *.gif *.png > index.html
[pene@donunix] perl -p -i.bak -e 's/^(.*)\.(.{3})$/<a href="$1\.$2"><img src="$1\.$2" width="320" border="0" alt="$1" ><\/a><br\/>/g' index.html

Well done, you've created an index.html file in your pictures directory.

No comments: