#!/bin/sh CORES=4 H=320 W=320 mkdir -p .thm ls *.jpg | xargs -n1 -P$CORES -I{} convert {} -thumbnail $Hx$W\> .thm/{} ( echo "$(basename $PWD)" for _file in *.jpg do ( echo "$_file" echo "

$_file

" echo "Back to Index

" echo "
" echo "" ) > .thm/$_file.html echo "" done echo "" ) > index.html