Created files
This commit is contained in:
1 parent
31c2d27a62
commit
5252fc1932
1 file changed
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
echo -e "What is the directory with the pdfs?"
|
||||||
|
#read PDFDIR
|
||||||
|
PDFDIR=/home/btmccrea/Downloads/pdfs/
|
||||||
|
if [ -d $PDFDIR ]; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo -e "Directory not found."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
echo -e "What is the output directory for the pdf's with missing addresses?"
|
||||||
|
#read OUTPUTFOLDER
|
||||||
|
OUTPUTFOLDER=/home/btmccrea/Documents/ouput
|
||||||
|
if [ -d $PDFDIR ]; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo -e "Directory not found."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
FILES=$(ls $PDFDIR)
|
||||||
|
cd $PDFDIR
|
||||||
|
echo $FILES
|
||||||
|
for f in "$FILES"
|
||||||
|
do
|
||||||
|
pdftotext $f - | TEMPFILE
|
||||||
|
ADDRESS=$(awk 'NR == 14 {print ; exit}' TEMPFILE)
|
||||||
|
echo $ADDRESS
|
||||||
|
if [ -z $ADDRESS ]; then
|
||||||
|
cp $f to $OUTPUTFOLDER
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user