Adding in questions

This commit is contained in:
TRBC Developer committed 2024-01-22 16:46:56 +00:00
1 parent e89085043b
commit 053b3ef75f
1 file changed
+34 -2
+34 -2
View File
@@ -1,9 +1,41 @@
#!/bin/bash
./Find_Missing_Addresses.sh
echo "Welcome! It must be the start of a new year! In order to get started with sorting and merging the PDF documents I need to know a little more information."
echo
echo
while :
do
echo "Where is the directory that has the PDF statments with address?"
read PDFDIR
if [ -d $PDFDIR ]
then
break
else
echo "Directory not found."
fi
done
#Get the folder for the output file.
while :
do
echo
echo "What output directory do you want for the sorted PDF's?"
read OUTPUTFOLDER
#OUTPUTFOLDER="/home/btmccrea/Downloads/output"
if [ -d $OUTPUTFOLDER ]
then
break
else
echo "Directory not found."
fi
done
./Find_Missing_Addresses.sh $PDFDIR $OUTPUTFOLDER
read -r -p "Do you want to continue? [Y/n]" response
response=${response,,} # tolower
if [[ $response =~ ^(y| ) ]] || [[ -z $response ]]; then
./Sort_and_Merge_Files.sh
./Sort_and_Merge_Files.sh $PDFDIR $OUTPUTFOLDER
fi