I have a while loop, I would like to stopped it when the user presses the letter "s" on the keyboard.
I should manage the problem with a "trap" and using relative signal, which by default block has with combination "ctrl + c", but I should have the same effect by pressing "s".
(I do not have to use the command read)
Where to place the commands?
could you explain me ?
Thank you
The code:
!/bin/bash
while true
do
echo text text text text
done