tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: McGuinness Todd <todd.mcguinness () nagra ! com>
To: tru64-unix-managers
Subject: ASE not liking PERL?
Date: Tue, 23 Apr 2002 16:12:18 +0000	[thread overview]
Message-ID: <102653755322566.tru64-unix-managers.marc@archive.invalid> (raw)

Hi Admins,

I have got a bit of a bug in a start/stop script for ASE which I am
maintaining.  PERL is called in the middle of this function and this seems
to be the problem.  Anyone have any ideas of how to solve?  This script
works very well on the command line...

Here is the error message:

Apr 23 17:43:14 cas01 ASE: local Agent Notice: user script:
/tmp/ase_sh1548[4]: perl:  not found
Apr 23 17:43:14 cas01 ASE: local Agent Notice: user script:
/tmp/ase_sh1548[4]: perl:  not found

and here is the code:

if [ "X${OPERATION}" = "Xstart" -o "X${OPERATION}" = "XSTART" ]
	then
	    cat $inputfile |  perl -e 'while(<STDIN>)
		{
	    	if( length( $_ ) > 3 )
	    		{
			$u=substr( $_, 3, length('$SERVICE'));
			$p=substr( $_, 33,length('$BNDL'));
			if( $u eq '$SERVICE' && $p eq '$BNDL' )
			{
		    	    @args=split(/\|/,$_);
		   	    $args[4] =~ s/N/Y/;
		  	    print join("|",@args);
			}
			else
			{
		    	    print $_
			}
	    	}
	        else
	        {
		    print $_
	        }
	    }' > $tmpfile
	elif [ "X${OPERATION}" = "Xstop" -o "X${OPERATION}" = "XSTOP" ]
	then    
    	    cat $inputfile |  perl -e 'while(<STDIN>)
		{
	        if( length( $_ ) > 3 )
	    		{
			$u=substr( $_, 3, length('$SERVICE'));
			$p=substr( $_, 33,length('$BNDL'));
			if( $u eq '$SERVICE' && $p eq '$BNDL' )
			{
		    	    @args=split(/\|/,$_);
		            $args[4] =~ s/Y/N/;
		    	    print join("|",@args);
			}
			else
			{
		    	    print $_
			}
	    	}
	    	else
	    	{
		    print $_
	    	}
	    }' > $tmpfile

	fi
}

thanks in advance,

Todd M. McGuinness 
Systems Engineer 
____________________________ 
NAGRAVISION SA 
Kudelski Group 
____________________________ 
Tel. : +41 21 732 03 11 
Direct: +41 21 732 0623    
Fax : +41 21 732 03 00        
E-mail :  mcguinness@nagra.com 


                 reply	other threads:[~2002-04-23 16:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox