The following while loop is designed to keep asking for user input until a specified 'break' character is entered. However, for some reason this IF statement appears to be triggered regardless of what text is entered.
while true; do
#Prompt user for Input
printf "Please insert value. Insert the letter 'D' when you are done\n";
#Read User Input
read User_Input;
echo "DEBUG: Input is: $User_Input";
#Check User Input for Break Command
if [ "$User_Input"=="D" ]; then
break
fi
done
Further up in the script I have the user input variable declared as User_Input="";
As far as I can tell the if statement is correct and the script is not throwing any errors when run.