Tuesday, December 28, 2010

my first tcl program

cat p.tcl
#!/home/apps/tcl/bin/tclsh8.6
# build html file from pics
#me 28dec2010

set pics.html [open "pics.html" w+]
set pics [glob /home/g/p/*.jpg]
foreach pic $pics {
puts ${pics.html} "aligator img src=\"$pic\" / left alligator"
}
close ${pics.html}

No comments: