Sponsored Content
Top Forums Shell Programming and Scripting Passing variable from shell script to python script Post 302476602 by shashi792 on Thursday 2nd of December 2010 05:20:37 AM
Old 12-02-2010
L is obtained from another script (this changes everytime) from the previous script im using
Code:
export L

command to pass it between scripts

what should be done for changing L
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing awk variable to the shell script

hi; i have a file containing lines like: 1|1069108123|96393669788|00963215755711|2|0|941||;serv:Pps6aSyria;first:0;bear i want to extract the second, third and fourth record of each line and store it in a file ";" seperated this is what i wrote while read line do ... (3 Replies)
Discussion started by: bcheaib
3 Replies

2. Shell Programming and Scripting

error in passing a variable to sqlplus from a shell script

hi, I am using a shell script from where i will be conecting to sqlplus.. i am having a problem in passing a variable to sqlplus query.. i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am... (3 Replies)
Discussion started by: kripssmart
3 Replies

3. Web Development

passing variables to python script

Hello again, You guys might remember me from the "Apache problems" thread. And because this forum is the only one that actually helped me out after months of problems I was hoping you could help me with something related. Now if you remember the final code that we made for creating an account... (0 Replies)
Discussion started by: darkphaux
0 Replies

4. Shell Programming and Scripting

Passing a variable from shell script to mysql query?

I heard this was possible but from my research I haven't been able to figure it out yet. Seems it should be simple enough. Basically from a high level view I'm trying to accomplish... . $X='grep foo blah.log' then 'mysql command SELECT foo FROM bar WHERE ' . $X or something like that. ... (2 Replies)
Discussion started by: kero
2 Replies

5. Shell Programming and Scripting

Shell to Python variable passing

Hi, I had to create a new thread as the old thread had to much of confusion I have two files shashi.sh and py.py I want to pass a variable from shashi.sh to py.py. How do i achieve that ?. shashi.sh export X=12 echo "$("pwd")" echo "$X" exec python py.py "$(X)" py.py... (0 Replies)
Discussion started by: shashi792
0 Replies

6. Shell Programming and Scripting

Problem passing arguments to a Python script

I have part of the script below and I tried calling the script using ./tsimplex.py --fstmod=chris.cmod --nxz=8x6 --varp=0.25 but am getting the error option --fstmod must not have an argument Any idea on how to fix this would be highly appreciated #! /usr/bin/python import... (0 Replies)
Discussion started by: kristinu
0 Replies

7. Shell Programming and Scripting

Issue with passing variable to Grep in a shell script

Hi, I'm trying to check if methods specified in a class have been added to the corrosponding interface. My code below is giving me the following errors: grep: function: No such file or directory grep: import($zipfile): No such file or directory grep: function: No such file or... (1 Reply)
Discussion started by: racshot65
1 Replies

8. Shell Programming and Scripting

how to set/get shell env variable in python script

greetings, i have a sh script that calls a python script. the sh script sets an env variable BIN: export BIN=bin64i need to get that BIN variable's value and use it within this python script. anyone know how to do this? thanx in advance. (5 Replies)
Discussion started by: crimso
5 Replies

9. Shell Programming and Scripting

Passing shell variable to awk script

I want to pass a shell variable to awk script : # cat file PSAPSR3 3722000 91989.25 2 98 PSAPSR7 1562000 77000.1875 5 95 PSAPUNDO 92000 4087.5625 4 96 #... (8 Replies)
Discussion started by: Reboot
8 Replies

10. Shell Programming and Scripting

Passing value of variable to a query within shell script

I have a script in which i connect to database to run a query and get the result of the query to a temp file. This works fine , now what i want is there is flat file which contains the value to be used in the query. I want to read this file line by line and then run the query for each value in that... (7 Replies)
Discussion started by: gpk_newbie
7 Replies
PEGASUS-CONFIG(1)														 PEGASUS-CONFIG(1)

NAME
pegasus-config - The authority for where parts of the Pegasus system exists on the filesystem. pegasus-config can be used to find libraries such as the DAX generators. SYNOPSIS
pegasus-config [-h] [--help] [-V] [--version] [--noeoln] [--perl-dump] [--perl-hash] [--python-dump] [--sh-dump] [--bin] [--conf] [--java] [--perl] [--python] [--python-externals] [--schema] [--classpath] [--local-site] [--full-local] DESCRIPTION
pegasus-config is used to find locations of Pegasus system components. The tool is used internally in Pegasus and by users who need to find paths for DAX generator libraries and schemas. OPTIONS
-h, --help Prints help and exits. -V, --version Prints Pegasus version information --perl-dump Dumps all settings in perl format as separate variables. --perl-hash Dumps all settings in perl format as single perl hash. --python-dump Dumps all settings in python format. --sh-dump Dumps all settings in shell format. --bin Print the directory containing Pegasus binaries. --conf Print the directory containing configuration files. --java Print the directory containing the jars. --perl Print the directory to include into your PERL5LIB. --python Print the directory to include into your PYTHONLIB. --python-externals Print the directory to the external Python libraries. --schema Print the directory containing schemas. --classpath Builds a classpath containing the Pegasus jars. --noeoln Do not produce a end-of-line after output. This is useful when being called from non-shell backticks in scripts. However, order is important for this option: If you intend to use it, specify it first. --local-site [d] Create a site catalog entry for site "local". This is only an XML snippet without root element nor XML headers. The optional argument "d" points to the mount point to use. If not specified, defaults to the user's $HOME directory. --full-local [d] Create a complete site catalog with only site "local". The an XML snippet without root element nor XML headers. The optional argument "d" points to the mount point to use. If not specified, defaults to the user's $HOME directory. EXAMPLE
To set the PYTHONPATH variable in your shell for using the Python DAX API: export PYTHONPATH=`pegasus-config --python` To set the same path inside Python: config = subprocess.Popen("pegasus-config --python-dump", stdout=subprocess.PIPE, shell=True).communicate()[0] exec config To set the PERL5LIB variable in your shell for using the Perl DAX API: export PERL5LIB=`pegasus-config --perl` To set the same path inside Perl: eval `pegasus-config --perl-dump`; die("Unable to eval pegasus-config output: $@") if $@; will set variables a number of lexically local-scoped my variables with prefix "pegasus_" and expand Perl's search path for this script. Alternatively, you can fail early and collect all Pegasus-related variables into a single global %pegasus variable for convenience: BEGIN { eval `pegasus-config --perl-hash`; die("Unable to eval pegasus-config output: $@") if $@; } AUTHOR
Pegasus Team http://pegasus.isi.edu 05/24/2012 PEGASUS-CONFIG(1)
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy