Re: [PLUG] Bash 'trap' command doesnt execute on SIGUSR1

2011-02-09 Thread म . हा . सा . ग . र
On Tue, Feb 8, 2011 at 1:31 AM, Manas Alekar wrote: >> In the following bash code snippet; my main aim is to throw a string >>'Unhandled exception occurred' using trap command. > > Trap is a mechanism for signal handling. You cannot do exception handling with > trap.  Reading: man 7 signal. > > Ma

Re: [PLUG] Bash 'trap' command doesnt execute on SIGUSR1

2011-02-07 Thread Manas Alekar
> In the following bash code snippet; my main aim is to throw a string >'Unhandled exception occurred' using trap command. Trap is a mechanism for signal handling. You cannot do exception handling with trap. Reading: man 7 signal. Manas ___ Pune GNU/Linux

Re: [PLUG] Bash 'trap' command doesnt execute on SIGUSR1

2011-02-07 Thread Mayuresh
On Mon, Feb 07, 2011 at 02:34:20AM -0800, अमेय साठे wrote: > Hi, > In the following bash code snippet; my main aim is to throw a string > 'Unhandled exception occurred' using trap command. The command should capture > 'exit 30' command. But; it is unable to do so. > trap  'echo " Unhandled condit

[PLUG] Bash 'trap' command doesnt execute on SIGUSR1

2011-02-07 Thread अमेय साठे
Hi, In the following bash code snippet; my main aim is to throw a string 'Unhandled exception occurred' using trap command. The command should capture 'exit 30' command. But; it is unable to do so. trap  'echo " Unhandled condition occurred "' SIGUSR1 testdir() { dir="$@" if  [ ! -d $dir ]     th