#! /bin/sh rm -f "$1" dir="`basename \"$1\" .html`" echo "" >"$1" echo "Page here..." >>"$1" echo "" >>"$1" cd "$dir" for i in *.html; do cat "$i" | sed -e 's,
,
,g;
s,
,
,g; s,,
,g' >"$i".tmp mv "$i".tmp "$i" done