Fixed problems with 2020 file and logic improvments
This commit is contained in:
1 parent
2fb552ed8a
commit
628cffcbda
3 files changed
+116
-43
No files matched your search
Regular → Executable
+58
-9
@@ -1,19 +1,68 @@
|
||||
#!/bin/bash
|
||||
|
||||
#import list from csv
|
||||
echo "Please clear all feilds except for the file name feild from the csv."
|
||||
while IFS='\t' read (awk -F, 'NR > 1' { print $1})
|
||||
#cd to and then remove files
|
||||
|
||||
#Get the folder with the pdf documents in it.
|
||||
while :
|
||||
do
|
||||
echo -e "What is the directory with the pdfs?"
|
||||
read PDFDIR
|
||||
#PDFDIR=/home/btmccrea/Downloads/pdfs/
|
||||
if [ -d $PDFDIR ]; then
|
||||
#read PDFDIR
|
||||
PDFDIR="/home/btmccrea/Downloads/pdfs"
|
||||
if [ -d $PDFDIR ]
|
||||
then
|
||||
break
|
||||
else
|
||||
echo -e "Directory not found."
|
||||
fi
|
||||
done
|
||||
done
|
||||
#Get the folder for the output file.
|
||||
while :
|
||||
do
|
||||
echo -e "What is the output directory for the pdf's with missing addresses?"
|
||||
#read OUTPUTFOLDER
|
||||
OUTPUTFOLDER="/home/btmccrea/Downloads/output/Final"
|
||||
if [ -d $OUTPUTFOLDER ]
|
||||
then
|
||||
break
|
||||
else
|
||||
echo -e "Directory not found."
|
||||
fi
|
||||
done
|
||||
#Get the folder with the csv
|
||||
while :
|
||||
do
|
||||
echo -e "What path and file with?"
|
||||
#read CSVFILE
|
||||
if [ -f $CSVFILE ]
|
||||
then
|
||||
break
|
||||
else
|
||||
echo -e "File not found."
|
||||
fi
|
||||
done
|
||||
|
||||
#import list from csv
|
||||
echo "Processing csv."
|
||||
while IFS=$'\t' read -r FILE
|
||||
do
|
||||
echo "FILE $FILE"
|
||||
# echo "user $USER"
|
||||
# echo "match $MATCH"
|
||||
# echo "${array[0]}"
|
||||
# if [[ "$MATCH" == "Match-Mailable" ]]
|
||||
# then
|
||||
#
|
||||
# echo -e "Processing file $FILE"lY
|
||||
cp $PDFDIR/"$FILE" $OUTPUTFOLDER
|
||||
# else
|
||||
# echo "no match"
|
||||
# fi
|
||||
done < /home/btmccrea/Downloads/Smarty_Streets.csv
|
||||
#FILE=$(cat /home/btmccrea/Downloads/Smarty_Streets.csv)
|
||||
#echo $FILE
|
||||
#IFS=$'\t'
|
||||
#for f in Smarty_Streets.csv
|
||||
#do
|
||||
# echo "doing file $f"
|
||||
# cp $PDFDIR/"$f" $OUTPUTFOLDER
|
||||
#done
|
||||
|
||||
#cd to and then remove files
|
||||
Reference in new issue
Block a user