2 articles Bash

Bash Scripting – TRAP

Many of us might have faced a stiuation where we have started a script, waiting for its outcome and suddenly someone/ourself do a CTRL+C by mistake to terminate the script. Wouldn’t it be nice if our script becomes ‘immune’ to CTRL+C signal. Here comes ‘trap’ command for help. ‘trap’ command basically traps the signal which…