Get return value from PERL script calling from KSH
All:
I am calling a PERL script from KSH. I need specific codes to be returned by the PERL Script.
For ex:
Ksh
-----
My idea is to get the value of result from the test.pl, by specifically making the test.pl to print the return code. Since I had some other print statements, my result is getting messed up and resulting some other earlier printouts in addition to my desired output. Any help how to get over the problem? Please help
Hi all, I have a ksh script that calls a tcl proc that sets a variable that I am attempting to return to the calling script? Is this possible or does the tcl variable live in its own space that I cannot access from ksh.
I have tried the following but when I do the var in my script is empty... (5 Replies)
Hi ,
I have a shell script which does some calling of procedures
once all the procedures are called I need to start another
ksh script which is present on a different unix box
How can this be done ?
Do I need to open a telnet session to connect to that box in my first script and... (1 Reply)
hi, I have a csh script, which has
setenv X xyz etc
My shell is korn
Is there some way I can "source" this to have the variables in my current korn shell?
thanks (3 Replies)
How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ?
I've given portion of the script here to explain the problem.
Portion of Script 1
=============
-----
-----
tmp=`a.ksh p1 p2 p3`
if then
# error processing
fi
-----... (10 Replies)
Hi all,
I have two ksh scripts
#sample1.sh
#!/bin/ksh
. ./sample2.sh
echo $fileExist
#sample2.sh
#!/bin/ksh
func()
{
i=1
return $a
}
func
echo $?
Here how should I return the value of sample2.sh back to sample1.sh?
Thanks in advance. (2 Replies)
I'm calling an expect script via a ksh script in cron and it is failing. The script runs fine if i run it manually. Does anyone know if it is an issue with compatibilty and if there is a way around it? (2 Replies)
Hi,
I am trying to call sql script from ksh job with parameters.The parameters passed from ksh job will be used in SELECT query in sql file to SPOOL the data in extract file.My questions are:
1) How to call a sql script from ksh job with parameters?
2) How to use the parameter in sql file to... (1 Reply)
I am trying to run a perl script which needs input arguments from a parent perl script, but doesn't seem to work. Appreciate your help in this regard.
From parent.pl
$input1=123;
$input2=abc;
I tried calling it with
system("/usr/bin/perl child.pl $input1 $input2");
and
`perl... (1 Reply)
Hi,
I need to edit a shell script which is calling another shell script. At the moment the program returns to the command prompt after executing each called script. I need to change it to make it return to the calling script so that the user is able to make another choice to execute the next... (11 Replies)
Friends,
I'm newbie with ksh so wanting some help....
1. I'm trying to call oracle stored procedure from ksh script by taking variable value from runtime, feed into script and execute procedure.
2. Put name1 and name2 value from script run replacing $3 & $4
I'm trying to put name1 in... (4 Replies)
Discussion started by: homer4all
4 Replies
LEARN ABOUT CENTOS
tap::parser::result::test
TAP::Parser::Result::Test(3) User Contributed Perl Documentation TAP::Parser::Result::Test(3)NAME
TAP::Parser::Result::Test - Test result token.
VERSION
Version 3.28
DESCRIPTION
This is a subclass of TAP::Parser::Result. A token of this class will be returned if a test line is encountered.
1..1
ok 1 - woo hooo!
OVERRIDDEN METHODS
This class is the workhorse of the TAP::Parser system. Most TAP lines will be test lines and if "$result->is_test", then you have a bunch
of methods at your disposal.
Instance Methods
"ok"
my $ok = $result->ok;
Returns the literal text of the "ok" or "not ok" status.
"number"
my $test_number = $result->number;
Returns the number of the test, even if the original TAP output did not supply that number.
"description"
my $description = $result->description;
Returns the description of the test, if any. This is the portion after the test number but before the directive.
"directive"
my $directive = $result->directive;
Returns either "TODO" or "SKIP" if either directive was present for a test line.
"explanation"
my $explanation = $result->explanation;
If a test had either a "TODO" or "SKIP" directive, this method will return the accompanying explanation, if present.
not ok 17 - 'Pigs can fly' # TODO not enough acid
For the above line, the explanation is not enough acid.
"is_ok"
if ( $result->is_ok ) { ... }
Returns a boolean value indicating whether or not the test passed. Remember that for TODO tests, the test always passes.
If the test is unplanned, this method will always return false. See "is_unplanned".
"is_actual_ok"
if ( $result->is_actual_ok ) { ... }
Returns a boolean value indicating whether or not the test passed, regardless of its TODO status.
"actual_passed"
Deprecated. Please use "is_actual_ok" instead.
"todo_passed"
if ( $test->todo_passed ) {
# test unexpectedly succeeded
}
If this is a TODO test and an 'ok' line, this method returns true. Otherwise, it will always return false (regardless of passing status on
non-todo tests).
This is used to track which tests unexpectedly succeeded.
"todo_failed"
# deprecated in favor of 'todo_passed'. This method was horribly misnamed.
This was a badly misnamed method. It indicates which TODO tests unexpectedly succeeded. Will now issue a warning and call "todo_passed".
"has_skip"
if ( $result->has_skip ) { ... }
Returns a boolean value indicating whether or not this test has a SKIP directive.
"has_todo"
if ( $result->has_todo ) { ... }
Returns a boolean value indicating whether or not this test has a TODO directive.
"as_string"
print $result->as_string;
This method prints the test as a string. It will probably be similar, but not necessarily identical, to the original test line.
Directives are capitalized, some whitespace may be trimmed and a test number will be added if it was not present in the original line. If
you need the original text of the test line, use the "raw" method.
"is_unplanned"
if ( $test->is_unplanned ) { ... }
$test->is_unplanned(1);
If a test number is greater than the number of planned tests, this method will return true. Unplanned tests will always return false for
"is_ok", regardless of whether or not the test "has_todo".
Note that if tests have a trailing plan, it is not possible to set this property for unplanned tests as we do not know it's unplanned until
the plan is reached:
print <<'END';
ok 1
ok 2
1..1
END
perl v5.16.3 2013-05-02 TAP::Parser::Result::Test(3)