MLUG: [MLUG] useful little script for displaying images in web directory
[MLUG] useful little script for displaying images in web directory
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sometimes I have a bunch of image files in a directory on my web server and I want to look at them to see what they all are. The script below does the trick for me. Let's call it image_index. Then I'd just do this:

image_index > images.html

And load images.html in my browser to see all the images. If there are very many images, it might be too many for your browser to handle.

Mike


-----------begin script on next line-------------- #!/bin/bash

echo '<html>'
\ls -1 *.{[Jj][Pp][Gg],[Jj][Pp][Ee][Gg],[Gg][Ii][Ff],[Pp][Nn][Gg]} | gawk '{print "<a href=\042"$0"\042><img src=\042"$0"\042></a><br>"}'
echo '</html>'
-----------end script on next previous line-------

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members