Hi,
I have tried with the following code;
if ;then
echo "Failure."
else
echo "Success."
fi
to test the exit status of the test.ksh shell script. But whatever is the exit status of the test.ksh shell script Failure. is always printed.
Please help.
regards,
Dipankar. (2 Replies)
from my main script, i am calling an expect script. there are a lot of conditions in the Expect script and it can have any exit value based on success or failure of the Expect Script. how can i check the exit status of Expect scritp in the main script. (1 Reply)
i have written a shell script that invokes main class of a java prg. the java prg does a System.exit(0) or (1) based on condition. how can i read or check the status in unix.... (4 Replies)
Hi
Can someone help me please?
In a standard UNIX .ksh script, if you have the exit status..say 5...what line do you have to enter into the script for this number to be automatically converted to its actual exit reason by looking up the exit status file...wherever that is?
thanks
angus (1 Reply)
Hello;
I regularly run monitoring scripts over ssh to monitoring scripts
But whenever a server is hung or in maintenance mode, my script hangs..
Are there anyways to trap exit status and be on my way ??
Looked at the ssh manpage and all I can see is a "-q" option for quiet mode ..
Thank... (2 Replies)
Hi ,
I have a bash script , which does the network configuration. Messages from this script are dumped on console as well as stored in a log file .
This script is invoked from a C code using system call . The script returns different exit code , to indicate different error cases. The... (1 Reply)
Hi
Im trying to write a script that will archive some file using java program.Below is the part of the script that I use and my problem is that the script always return with status 0.Below is part of my script(end part)
purge.ksh
echo "No of files before tar :... (4 Replies)
I have a script named check which will read the content of a file and check wether those files exist in the current directory. If so it will have the exit status of 0, otherwise it will have 1.
check script:
#!/bin/bash
if ; then #Check there is enough command line parameters.
exit 1... (2 Replies)
Hi all,
I am trying to use a script (a.sh) which is calling another script(b.sh).
And I want to use the exit code(set by me) of b.sh in a.sh.
I am using this in b.sh
#!/bin/sh
<-- code -->
if ; then
exit 0
else
exit 1
fiBut... (2 Replies)
Main Script
#!/bin/ksh
echo "Maimn script"
./clocal/www/web-data/WAS/WebSphere7/scripts/DealerLocator/Scripts/secondscript.ksh
echo "$? = status"
Sdecond Script
#!/bin/ksh
echo "In second SCript"
exit 1
Output:
Maimn script
./testmain.ksh:... (4 Replies)
Discussion started by: dineshaila
4 Replies
LEARN ABOUT DEBIAN
io::async::protocol::linestream
IO::Async::Protocol::LineStream(3pm) User Contributed Perl Documentation IO::Async::Protocol::LineStream(3pm)NAME
"IO::Async::Protocol::LineStream" - stream-based protocols using lines of text
SYNOPSIS
Most likely this class will be subclassed to implement a particular network protocol.
package Net::Async::HelloWorld;
use strict;
use warnings;
use base qw( IO::Async::Protocol::LineStream );
sub on_read_line
{
my $self = shift;
my ( $line ) = @_;
if( $line =~ m/^HELLO (.*)/ ) {
my $name = $1;
$self->invoke_event( on_hello => $name );
}
}
sub send_hello
{
my $self = shift;
my ( $name ) = @_;
$self->write_line( "HELLO $name" );
}
This small example elides such details as error handling, which a real protocol implementation would be likely to contain.
DESCRIPTION EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters:
on_read_line $line
Invoked when a new complete line of input is received.
PARAMETERS
The following named parameters may be passed to "new" or "configure":
on_read_line => CODE
CODE reference for the "on_read_line" event.
METHODS
$lineprotocol->write_line( $text )
Writes a line of text to the transport stream. The text will have the end-of-line marker appended to it; $text should not end with it.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2012-10-24 IO::Async::Protocol::LineStream(3pm)