Sponsored Content
Top Forums Shell Programming and Scripting calling a perl script with arguments from a parent perl script Post 302595353 by grajp002 on Thursday 2nd of February 2012 11:37:05 PM
Old 02-03-2012
calling a perl script with arguments from a parent perl script

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
Code:
system("/usr/bin/perl child.pl $input1 $input2");

and 

`perl child.pl $input1 $input2`;

and

`perl child.p`l $input1 $input2;

None seem to work. Any suggestions?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing arguments to a Perl script

I am playing around with Perl and wrote the script below that is executed from the command line, it will split data up in a file based on a value supplied. When executed you provide two arguments - the file that contains the data to be split and the character you want to split by. It works as... (4 Replies)
Discussion started by: jyoung
4 Replies

2. Shell Programming and Scripting

Calling a perl script from a perl script

printf(”Going to call another script... \n”); system(”/my_dir/B.pl”); # call another perl script B.pl exit; Hi everyone, above is an example that i am using to call another perl script from the current perl script. I have two concerns : 1) This there a better way of achieving the same... (6 Replies)
Discussion started by: new2ss
6 Replies

3. Shell Programming and Scripting

calling problem in perl script

Hi , Here is my piece of code-- main(); sub main { $result = GetOptions ("LogDir=s" => \$LogDir, "Summary" => \$Summary, "Indiviual=s" => \$Individual , "Diagnostics=s" => \$Diagnostics, ... (1 Reply)
Discussion started by: namishtiwari
1 Replies

4. Shell Programming and Scripting

Calling a shell script from a perl script

Hi, I have one shel script which returns some value and I am calling this shell script from a perl script which needs the out put/return value of shell script. But I don't know how to collect the output/return value of the shell script. Can any one give some idea on it? For example: The... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

5. Shell Programming and Scripting

Calling 3 perl script from one

hi all, I have 3 perl scripts a.pl,b.pl and c.pl each of these work when i pass a date for eg: perl c.pl 2010-05-27 now i want to write a perl script that would call the 3 scripts and make it run all the 3 scripts (a.pl,b.pl,c.pl) parallelly rather than 1 after the other....... pls... (2 Replies)
Discussion started by: siva_nagarajan
2 Replies

6. Shell Programming and Scripting

Calling a Perl script in a Bash script -Odd Situation

I am creating a startup script for an application. This application's startup script is in bash. It will also need to call a perl script (which I will not be able to modify) for the application environment prior to calling the application. The problem is that this perl script creates a new shell... (5 Replies)
Discussion started by: leepet01
5 Replies

7. Shell Programming and Scripting

How to accept arguments in shell script when calling in perl

I have a shell script like this: #!/bin/sh $PYTHON MetarDecoder.py < ../data/mtrs/arg1/arg2 And I'm calling it with this in perl: my $output = `./metar_parse.sh --options`; It's successful when I put in actual values for arg1 and arg2 in the shell script, but I'd like to pass arguments... (1 Reply)
Discussion started by: civilsurfer
1 Replies

8. Shell Programming and Scripting

How we can pass the argument when calling shell script from perl script

Can someone let me know how could I achieve this In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies

9. Shell Programming and Scripting

calling a shell script present on another server using perl script.

Hi, I am working on a sever A. I want to write a perl script to execute a shell script persent on the server B. please help me in this. thanks in advance. (3 Replies)
Discussion started by: anandgodse
3 Replies

10. Shell Programming and Scripting

Passing arguments to a perl script

Hi I need to pass comma seperated arguments to a perl script? It is like: Exect.pl -d GUI1,GUI2,GUI3 and I need to store these argsGUI1,GUI2,GUI3 in an array. can anyone suggest how to do that: (1 Reply)
Discussion started by: rkrish
1 Replies
SoTriggerAny(3) 						       Coin							   SoTriggerAny(3)

NAME
SoTriggerAny - The SoTriggerAny class is a fan-in engine for triggers. When any one of the input triggers are 'pulsed', any field connected as a slave to the engine output will be notified. SYNOPSIS
#include <Inventor/engines/SoTriggerAny.h> Inherits SoEngine. Public Member Functions virtual SoType getTypeId (void) const virtual const SoFieldData * getFieldData (void) const virtual const SoEngineOutputData * getOutputData (void) const SoTriggerAny (void) Static Public Member Functions static SoType getClassTypeId (void) static void * createInstance (void) static void initClass (void) Public Attributes SoSFTrigger input0 SoSFTrigger input1 SoSFTrigger input2 SoSFTrigger input3 SoSFTrigger input4 SoSFTrigger input5 SoSFTrigger input6 SoSFTrigger input7 SoSFTrigger input8 SoSFTrigger input9 SoEngineOutput output Protected Member Functions virtual ~SoTriggerAny (void) Static Protected Member Functions static const SoFieldData ** getInputDataPtr (void) static const SoEngineOutputData ** getOutputDataPtr (void) Detailed Description The SoTriggerAny class is a fan-in engine for triggers. When any one of the input triggers are 'pulsed', any field connected as a slave to the engine output will be notified. Constructor &; Destructor Documentation SoTriggerAny::SoTriggerAny (void) Default constructor. SoTriggerAny::~SoTriggerAny (void) [protected], [virtual] Destructor is protected because explicit destruction of engines is not allowed. Member Function Documentation SoType SoTriggerAny::getClassTypeId (void) [static] This static method returns the SoType object associated with objects of this class. Reimplemented from SoEngine. SoType SoTriggerAny::getTypeId (void) const [virtual] Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. Usage example: void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups. Implements SoBase. const SoFieldData ** SoTriggerAny::getInputDataPtr (void) [static], [protected] Returns the SoFieldData class which holds information about inputs in this engine. Reimplemented from SoEngine. const SoEngineOutputData ** SoTriggerAny::getOutputDataPtr (void) [static], [protected] Returns the SoEngineOutputData class which holds information about the outputs in this engine. Reimplemented from SoEngine. const SoFieldData * SoTriggerAny::getFieldData (void) const [virtual] Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. Reimplemented from SoFieldContainer. const SoEngineOutputData * SoTriggerAny::getOutputData (void) const [virtual] This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. Implements SoEngine. void SoTriggerAny::initClass (void) [static] Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoEngine. Member Data Documentation SoSFTrigger SoTriggerAny::input0 Input trigger. SoSFTrigger SoTriggerAny::input1 Input trigger. SoSFTrigger SoTriggerAny::input2 Input trigger. SoSFTrigger SoTriggerAny::input3 Input trigger. SoSFTrigger SoTriggerAny::input4 Input trigger. SoSFTrigger SoTriggerAny::input5 Input trigger. SoSFTrigger SoTriggerAny::input6 Input trigger. SoSFTrigger SoTriggerAny::input7 Input trigger. SoSFTrigger SoTriggerAny::input8 Input trigger. SoSFTrigger SoTriggerAny::input9 Input trigger. SoEngineOutput SoTriggerAny::output (SoSFTrigger) Connect to the output with the field(s) you want notified upon any input trigger 'pulses'. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SoTriggerAny(3)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy