Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Passing vaiables to first script Post 302553653 by tsurendra on Thursday 8th of September 2011 07:38:14 AM
Old 09-08-2011
by exporting the variable in script2, we can use that in script1
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing parameter from Shell-script to Sql-script

Dear Friends, Please help me to achieve the following: I want to pass one parameter from Shell-script to Sql-script. Example: My ShellScript.sh is calling report.sql like this: /bin/sqlplus /reports.sql And My report.sql is calling many Stored-Procedures like this: exec... (0 Replies)
Discussion started by: subodhbansal
0 Replies

2. Shell Programming and Scripting

Passing the values to the secondary script when it invoked by primary script

Hi, When I invoke a script s1.sh it will call an another script s2.sh by itself. This script s2.sh will call some java files, so while running the script it asks for a file name to be processed. Which we can see in the screen. The file name to be processed is present in script s1.sh Now... (1 Reply)
Discussion started by: venu_eie
1 Replies

3. UNIX for Advanced & Expert Users

Passing the values to the secondary script when it invoked by primary script

Hi, When I invoke a script s1.sh it will call an another script s2.sh by itself. This script s2.sh will call some java files, so while running the script it asks for a file name to be processed. Which we can see in the screen. The file name to be processed is present in script s1.sh Now I... (2 Replies)
Discussion started by: venu_eie
2 Replies

4. Shell Programming and Scripting

passing a variables value from the called script to calling script using ksh

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)
Discussion started by: rajarkumar
10 Replies

5. Shell Programming and Scripting

call a script from another script passing parameters

I want to call script2 from script1 passing parameters. I want to read the parameters list in script1, check the local directory (for example - lpath1|lpath2|lpath3|lpath4|lpath5|) for the existance of files and set the` lcount` to the number of files in this folder (`... (2 Replies)
Discussion started by: Lenora2009
2 Replies

6. Shell Programming and Scripting

Passing variable from shell script to python script

I have a shell script main.sh which inturn call the python script ofdm.py, I want to pass two variables from shell script to python script for its execution. How do i achieve this ????? Eg: main.sh a=3 b=3; c= a+b exec python ofdm.py ofdm.py d=c+a Thanks in Anticipation (4 Replies)
Discussion started by: shashi792
4 Replies

7. Shell Programming and Scripting

Reading a string and passing passing arguments to a while loop

I have an for loop that reads the following file cat param.cfg val1:env1:opt1 val2:env2:opt2 val3:env3:opt3 val4:env4:opt4 . . The for loop extracts the each line of the file so that at any one point, the value of i is val1:env1:opt1 etc... I would like to extract each... (19 Replies)
Discussion started by: goddevil
19 Replies

8. UNIX for Dummies Questions & Answers

Passing shell script parameter value to awk command in side the script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies

9. Shell Programming and Scripting

Passing variable from called script to the caller script

Hi all, Warm regards! I am in a difficult situation here. I have been trying to create a shell script which calls another shell script inside. Here is a simplified version of the same. Calling Script. #!/bin/ksh # want to run as a different process... (6 Replies)
Discussion started by: LoneRanger
6 Replies

10. Shell Programming and Scripting

Passing stdin value into a script that is called from another script

I'm trying to automatically pass user input values into a script that is being called from another script, below is my current script and I added a comment next to the script where it asks user to enter input value. Thanks, mbak #!/bin/ksh echo " Adding disks for DB server then Enter YES... (2 Replies)
Discussion started by: mbak
2 Replies
Sub::Exporter::GlobExporter(3pm)			User Contributed Perl Documentation			  Sub::Exporter::GlobExporter(3pm)

NAME
Sub::Exporter::GlobExporter - export shared globs with Sub::Exporter collectors VERSION
version 0.002 SYNOPSIS
First, you write something that exports globs: package Shared::Symbol; use Sub::Exporter; use Sub::Exporter::GlobExport qw(glob_exporter); use Sub::Exporter -setup => { ... collectors => { '$Symbol' => glob_exporter(Symbol => '_shared_globref') }, }; sub _shared_globref { return *Common } Now other code can import $Symbol and get their *Symbol made an alias to *Shared::Symbol::Symbol. If you don't know what this means or why you'd want to do it, you may want to stop reading now. The other class can do something like this: use Shared::Symbol '$Symbol'; print $Symbol; # prints the scalar entry of *Shared::Symbol::Symbol ...or... use Shared::Symbol '$Symbol' => { -as => 'SharedSymbol' }; print $SharedSymbol; # prints the scalar entry of *Shared::Symbol::Symbol OVERVIEW
Sub::Exporter::GlobExporter provides only one routine, "glob_exporter", which may be called either by its full name or may be imported on request. my $exporter = glob_exporter( $default_name, $globref_locator ); The routine returns a collection validator that will export a glob into the importing package. It will export it under the name $default_name, unless an alternate name is given (as shown above). The glob that is installed is specified by the $globref_locator, which can be either the globref itself, or a reference to a string which will be called on the exporter For an example, see the "SYNOPSIS", in which a method is defined to produce the globref to share. This allows the glob-exporting package to be subclassed, for for the subclass to choose to re-use the same glob when exporting or to export a new one. If there are entries in the arguments to the globref-exporting collector other than those beginning with a dash, a hashref of them will be passed to the globref locator. In other words, if we were to write this: use Shared::Symbol '$Symbol' => { arg => 1, -as => 2 }; It would result in a call like the following: my $globref = Shared::Symbol->_shared_globref({ arg => 1 }); AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.10.1 2010-11-23 Sub::Exporter::GlobExporter(3pm)
All times are GMT -4. The time now is 05:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy