How to store the value from python in shell scripting?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to store the value from python in shell scripting?
# 1  
Old 06-29-2012
How to store the value from python in shell scripting?

I am calling fab file from shell, and i am getting the output from python. How to store that value in shell?

Eg:- I am taking the value using yaml file in python. Since i am calling python from shell, i need to store the value in variable or in array using shell, because my next call is running in shell using this output
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Python - store output of command to a variable

I am trying to store output of python command in variable. Could you please help how I can do that ? For example I am executing the following command - "CentOS" in server_desc The output would be True or False I would like to store the output in a variable say outPut and use condition... (4 Replies)
Discussion started by: atanubanerji
4 Replies

2. Post Here to Contact Site Administrators and Moderators

Is it possible to add Python in the description of Shell Programming and Scripting of this forum?

https://www.unix.com/shell-programming-and-scripting/ The current description of Shell Programming and Scripting has: Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. Perl, php are there. Is it possible to add PYTHON there too? (3 Replies)
Discussion started by: cola
3 Replies

3. Shell Programming and Scripting

Unable to store "python --version" to a shell variable

Hi All, I need to get the version of python installed and store it in a variable for later use. Whereas it is printing on the console instead of storing to variable. I am able to store output of ls command in a variable. Please check the below code : root@myhost:/volumes/srini# cat... (4 Replies)
Discussion started by: srinivasan.neel
4 Replies

4. Programming

To check the file permissions using python scripting

Hi, For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755. Am able to check this using the statement: "if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):" But the problem here... (0 Replies)
Discussion started by: arjun_arippa
0 Replies

5. UNIX for Advanced & Expert Users

Help on Shell Scripting - to store output to a fixed file

Hi I have a file called "test.txt" and it looks like this x y z x/c y/c/b now, i want to run a command and its output will be like this x 10 y/c/b 20 z 78 -------- my requirement is, i want to add the command output to "test.txt" as like below x 10 y ... (1 Reply)
Discussion started by: siva kumar
1 Replies

6. Shell Programming and Scripting

how to store output into variable-in unix shell scripting

Hi, Output of "ps -o etime,time,pcpu,pmem,fname -C sbd-java" command is - Elapsed Time %cpu %MEM COMMAND 02:14:03 00:03:28 2.5 6.3 sbd-java Can anyone tell me, how to store the the value 2.5 in a variable? When I say echo $X where x is a variable then... (4 Replies)
Discussion started by: pspriyanka
4 Replies

7. Shell Programming and Scripting

Help in scripting, store value in variable

Hi all, I have a script in which i need to run a command like "/opt/dell/srvadmin/sbin/omreport about" and output will be something like Version : 6.3.0 Copyright : Copyright (C) xxx Inc. 1995-2010 All rights reserved. Company : xxx Inc. In this i need to save the version... (13 Replies)
Discussion started by: Renjesh
13 Replies

8. Programming

Python: bash-shell-like less functionality in the python shell

Hello, Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells? Example: >>> import subprocess >>> help(subprocess) ... ... I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Discussion started by: Narnie
0 Replies

9. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
Login or Register to Ask a Question
qpid-python-test(1)						   User Commands					       qpid-python-test(1)

NAME
qpid-python-test - run tests of the python QPID library for a broker SYNOPSIS
qpid-python-test [options] PATTERN ... DESCRIPTION
Run tests matching the specified PATTERNs. OPTIONS
-h, --help show this help message and exit -l, --list list tests instead of executing them -b BROKER, --broker=BROKER run tests against BROKER (default localhost) -f FILE, --log-file=FILE log output to FILE -v LEVEL, --log-level=LEVEL only display log messages of LEVEL or higher severity: DEBUG, WARN, ERROR (default WARN) -c CATEGORY, --log-category=CATEGORY log only categories matching CATEGORY pattern -m MODULES, --module=MODULES add module to test search path -i IGNORE, --ignore=IGNORE ignore tests matching IGNORE pattern -I IFILE, --ignore-file=IFILE ignore tests matching patterns in IFILE -H, --halt-on-error halt if an error is encountered -t, --time report timing information on test run -D DEFINE, --define=DEFINE define test parameters SEE ALSO
For more information on qpid-python-test please check the QPID wiki at http://qpid.apache.org. Apache QPID October 2011 qpid-python-test(1)