Posts tagged 'trap'

Luca Lanziani

It's a Trap!

I do a big use of shell scripts, and many of them contain a for loop, do you know what normally happen when you press CTRL^C and the script is executing an action inside the loop?

for i in test{6..10}.com; do
    echo "pinging ${i}"; ping -c ...