Nullify the effect of Trap command in later part of the script

Hi All,

i have an issue regarding trap command.
i have specified trap function in the beginning of the script to catch some signals but in the later part of the script i want to remove the effect of this.
Can anybody help me out of this.

for e.g. pressing Ctrl+C for the first time should be trapped, but the second time Ctrl+C should work as usual.

You could use a trap with no commands (args) (specifying the signals you don't want to trap anymore).

i.e.

trap "do_something; exit" 1 2 5 9 15 16
.....
trap 2
(or)
trap - 2

Will stop the trap for signal 2

Signals ignored upon entry to the shell cannot be trapped or reset. Trapped signals are reset to their origi-nal values in a child process when it is created.