Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: MLUG membership <EMAIL:PROTECTED>
- Subject: [MLUG] useful little script for displaying images in web directory
- From: Mike Miller <EMAIL:PROTECTED>
- Date: Sun, 4 Mar 2007 23:36:10 -0600 (CST)
- Delivery-date: Sun, 04 Mar 2007 23:36:48 -0600
- Envelope-to: EMAIL:PROTECTED
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
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