Script with a recursive prompt for file management?

My apologies, I’m new to BASH scripting and may be in the wrong place. I’ve just bought a new Mac and am trying to write BASH scripts. My first attempt will help me move files from my Downloads directory.

I’d like to have a programme that asks me for a search string to find in my Downloads folder. I will then move the results of these files to another directory. I’d like the prompt to loop – allowing me to refine my search terms until I’ve listed only the files I want.

I’ve been able to come up with the following. But I’ve run into the obvious problem of having to copy/paste my if statement infinite times potential. Is there a better way to do this? Perhaps put the whole thing in a loop? Here’s what I have so far.

#!/bin/bash   # This script helps manage files that are found in the Downloads DIRECTORY # and can relocate them to other directories.   # Set up an if-then statement/loop that allows you to search by extension or # other wildcard until you find what you're looking for.  echo Searching Downloads directory  read -p 'Search ... [regex]? ' RESPONSE  find Downloads -maxdepth 1 -name "$  {RESPONSE}"  FOUND=$  (find Downloads -maxdepth 1 -name "$  {RESPONSE}")   # Prompt to move these files    read -p 'Would you like to move these files [y = Yes] ' FILE_MOVE   if [ "$  FILE_MOVE" = "y" ]   then     read -p 'Which directory? ' DIRECTORY_MOVE     mv FOUND DIRECTORY_MOVE   else     read -p 'Would you like to keep searching [y = Yes] ' KEEP_SEARCHING fi   if [ "$  KEEP_SEARCHING" = "y" ]   then     read -p 'Search ... [regex]? ' RESPONSE     find Downloads -maxdepth 1 -name "$  {RESPONSE}"   else     echo Goodbye!! fi