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
MINCCONCAT(1)							 MINC User's Guide						     MINCCONCAT(1)

NAME
mincconcat - concatenate minc files along a specific dimension SYNOPSIS
mincconcat [<options>] <infile1>.mnc [<infile2>.mnc ...] <outfile>.mnc DESCRIPTION
Mincconcat will concatenate a number of minc files together, producing a single output file. The concatenation is done along a specified dimension, with the slices being sorted into ascending order. The concatenation dimension can either be a dimension in the file, in which case coordinates for sorting are taken directly from the input files, or it can be a new dimension and the coordinates are specified with a command-line option. OPTIONS
Note that options can be specified in abbreviated form (as long as they are unique) and can be given anywhere on the command line. General options -2 Create a MINC 2.0 format output file. -clobber Overwrite an existing file. -noclobber Don't overwrite an existing file (default). -verbose Print out progress information for each chunk of data copied (default). -quiet Do not print out progress information. -max_chunk_size_in_kb size Specify the maximum size of the copy buffer (in kbytes). Default is 4096 kbytes. -filelist filename Specify a file containing a list of input file names. If "-" is given, then file names are read from stdin. If this option is given, then there should be no input file names specified on the command line. Empty lines in the input file are ignored. Output type options -filetype Don't do any type conversion (default). -byte Write out 8-bit integer voxels. -short Write out 16-bit integer voxels. -int Write out 32-bit integer voxels. -long Superseded by -int. -float Write out single-precision floating point values. -double Write out double-precision floating point values. -signed Write out values as signed integers (default for short and long). Ignored for floating point types. -unsigned Write out values as unsigned integers (default for byte). Ignored for floating point types. -valid_range min max Specifies the valid range of output voxel values in their integer representation. Default is the full range for the type and sign. This option is ignored for floating point values. Concatenation options -concat_dimension name Specifies the name of concatenation dimension. If the dimension exists in the input files, then coordinates are taken from those files. If not, then a new dimension is created and the coordinate for each input file is taken from command-line options. The default is to use the slowest varying dimension of the first file. -start start Specifies the starting coordinate for the new dimension (default = 0.0). -step step Specifies the separation between voxels for the new dimension (default = 1.0). -width width Specifies the (constant) width of each sample along the new dimension (default = none). -coordlist c1,c2,... Specifies a comma-separated list of coordinates along the new dimension. -widthlist w1,w2,... Specifies a comma-separated list of widths along the new dimension. -filestarts s1,s2,... Specifies a comma-separated list of offsets to the coordinate origins for each of the files listed on the command line. This option is useful for concatenating files along an existing dimension, for example for concatenating multiple functional runs along a time dimension. -check_dimensions Check that all input files have matching sampling in world dimensions (default). -nocheck_dimensions Ignore any differences between input files in world dimensions sampling. -ascending Sort coordinates in ascending order (default). -descending Sort coordinates in descending order. -interleaved Sort slabs by their dimension coordinate, interleaving if necessary (default). -sequential Don't sort slabs, just concatenate them together. WARNING - this will destroy the dimension information along the concatenating dimension, replacing the start and step with zero and one. Generic options for all commands: -help Print summary of command-line options and exit. -version Print the program's version number and exit. EXAMPLES
To concatenate two volumes with dimensions zspace, yspace, xspace, having interleaved slices along zspace, we can simply use mincconcat input1.mnc input2.mnc output.mnc If we have a bunch of compressed (yspace, xspace) images that we wish to concatenate into an evenly spaced volume, then we can type mincconcat input1.mnc.gz input2.mnc.gz input3.mnc.gz input4.mnc.gz output.mnc -concat_dimension zspace -start -23 -step 2 AUTHOR
Peter Neelin COPYRIGHTS
Copyright (C) 1995 by Peter Neelin $Date: 2005-07-15 17:38:08 $ MINCCONCAT(1)
All times are GMT -4. The time now is 02:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy