I have this bash-written hangman game for a school project, and currently I am trying to replace the ctrl-c exit command for a while loop break, so the user goes back from the actual game to the categories selection menu.
The code I am currently using is:
trap "break" SIGINT
and inside the while loop:
Everything works fine when a text is printed in the loop and also when the sleep command is running, but when the algorithm is at the read command, pressing ctrl-c just inputs "^C" on the console.