pmd=../../,,pmd/markdown for (i in *.text) { stem=`{echo $i | sed 's,.text$,,'} $pmd < $i >$"stem.html }