I wrote a bash script that logs keycodes in a simple file. I have put the code in a while loop because I want it to log continuosly. But if I run the bash script in the terminal, the cursor just keeps blinking suggesting that the file is indeed caught in an infinte loop. Now i want to be able to quit this loop gracefully. I don't know how. Ctrl+C won't work. I just close the terminal and force quit the process. How do i break out of the while loop as and when the user feels like quitting the program?
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
If you get a blinking cursor you are probably not actually in a loop. You are probably expecting input. Try Ctrl+D. If that doesn't work then open a new terminal and |
|||||
|