#!/bin/ksh
#
# $Revision: 1.4 $ $Date: 2012-07-26 17:11:47-04 $
# $Source: /home/vogelke/bin/RCS/estdump,v $
# $Host: sys7.com $
# $UUID: ef3f945b-5f51-3106-bb4a-ce297e45d86b $
#
#< estdump: dump draft files of all indexed documents into the
#  current directory in the form "nnnnnnnn.est", where "nnnnnnnn"
#  is the document ID number including leading zeroes.

db="$1"
test "$db" = "" && { echo "usage: $0 db-directory" ; exit 1; }
test -d "$db"   || { echo "$db: not a directory"   ; exit 2; }

exec estcmd search -max -1 -dd $db '[UVSET]'
exit 3
