#!/bin/ksh
# chdir to working directory
cd src/posts
cat <<'EOF'
Welcome!
Welcome to my little place on the web. It may not been the pretties
you've seen today, but it's all self made.
Posts
EOF
# print list
ls -r1 *.ps *.pm *.ph *.pa *.pt 2>/dev/null | while read line
do
TITLE="$(echo "${line%%.*}" | tr '_' ' ')"
URI="posts/${line%%.*}.html"
cat <
$TITLE
EOF
done
cat <
EOF