#!/bin/sh

# save stdin to a file since unzip doesn't work on streams
TEMP=`mktemp`
dd of=$TEMP 2> /dev/null

TEMPDIR=`mktemp -d`
unzip -oq $TEMP -d $TEMPDIR   # Extract the file
tr "<" "\012" < $TEMPDIR/word/document.xml | grep ^w:t \
	| cut '-d>' -f2, | uniq 
rm $TEMP
rm -r $TEMPDIR   #Delete excess (formatting) folders
