thanks for the support guys .. have a grate day ..

On 7/31/06, Prabu <[EMAIL PROTECTED]> wrote:

Gregory Machin wrote:
> Hi
> My perl script is called by a bash script, used in a compile / build
env.
> But the bash script is not seeing my script's exit and is timming out
and
> continuing ...
>
> How can I pass a standard exit code 0 = success 1 = fail to the
operating
> system / calling script.
>
> Many Thanks
>
Hello,

Hope this is something you are looking for...

#!/bin/sh
echo "Call Perl Program";
perl pro.pl
val=$?;
if [[ $val == 0 ]]
then
echo "Success $val";
else
echo "Fail $val";
fi

The $? will contain the exit status of the perl program(command).

--
Prabu.M.A
When I was born I was so surprised
        I didnt talk for a period and half
                                 -Gracie Allen




--
Gregory Machin
[EMAIL PROTECTED]
www.linuxpro.co.za

Reply via email to