> 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
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
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