summaryrefslogtreecommitdiff
path: root/pdf_dump_first_page.sh
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-11-06 01:42:13 +0100
committerJules Laplace <julescarbon@gmail.com>2018-11-06 01:42:13 +0100
commit002e72bb172c34bb71756f9e6c23294913f1ef85 (patch)
treeea3f3f91bb1a5219801fbf26cf5c12a3eeff1a55 /pdf_dump_first_page.sh
parent743159991f1bcf2080693424ebe5ad7001865583 (diff)
maybe rm empty txts
Diffstat (limited to 'pdf_dump_first_page.sh')
-rw-r--r--pdf_dump_first_page.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/pdf_dump_first_page.sh b/pdf_dump_first_page.sh
index ec1d3bbb..2749915d 100644
--- a/pdf_dump_first_page.sh
+++ b/pdf_dump_first_page.sh
@@ -7,5 +7,13 @@ for i in datasets/s2/pdf/*/*/*.pdf
then
pdf2txt.py -p 1 $i > $OUTPUT
echo $OUTPUT
+ else
+ if [ -s $OUTPUT ]
+ then
+ echo "found $OUTPUT"
+ else
+ echo "rm empty $OUTPUT"
+ rm -f $OUTPUT
+ fi
fi
done