#!/bin/bash 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 $PDFDIR $OUTPUTFOLDER fi