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
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>