On Tue, Aug 26, 2003 at 09:48:07AM -0500, Shawn wrote:
> On Tue, 26 Aug 2003 09:41:06 -0500
> Shawn <sfertch at real-time.com> wrote:
> 
> > I want to take an ls of a directory and dump it into an html file
> > (pics) for temporary use. Until I get a sight up with thumbnails (read
> > lack of time right now).
> > 
> > What's the best way to do this?
> > 
> > I tried a for loop, but it didn't work.
> > 
> > any help on this would be appreciated.
> > 
> 
> Should probably clarify the for loop I tried...
> 
> from within the directory I did:
> 
>  for i in ls; do echo '<P><IMG SRC="$i"/></P' >> file.html; done
> 
> Then I was going to add a couple of lines to the top and bottom manually...
> 
> It's a syntax issue, but am not certain of the best way to do this.
> 

Untested one-liners:

 perl -le 'print qq[<a href="$_">$_</a><br>] for @ARGV' *.jpg > foo.html

 perl -le 'print qq[<p><img src="$_">] for @ARGV' *.jpg > bar.html

-- 
trammell at el-swifto.com  9EC7 BC6D E688 A184 9F58  FD4C 2C12 CC14 8ABA 36F5
Twin Cities Linux Users Group (TCLUG)      Minneapolis/St. Paul, Minnesota

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list