I'm running a loop like this:
for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do traceroute $ip; done
I want to be able to kill the current traceroute when it gets boring (and before its 30-hop max), and move on to the next one. But when I press Ctrl+c, it kills the whole for
loop.
I guess what I need is either a way to end the current traceroute
, or to send the loop a continue
.
This question and this one are doing a similar thing, but in more complicated situations. Is there a reasonable way to do this when just running stuff from the prompt?