I have a bash lopp
as
#!/bin/bash
for (( c=0; c<=1000000; c++ ))
do
SOME STUFF HERE
done
I interrupt the long loop by a keyboard input like Ctrl+C
but Ctrl+C
simply terminates the script. I am looking for an alternative to continue the current cycle and break the loop after finishing the running STUFF
in the current cycle.