#!/bin/sh
find -name '*.doc' |
while read A; do
	echo "$A"
	B="index/$A.txt"
	mkdir -p "`dirname "$B"`"
	catdoc "$A" >"$B"
done
