How to store the value from python in shell scripting?

Thread Tools Search this Thread
# 1  
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

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

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? 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. Shell Programming and Scripting

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... (1 Reply)
Discussion started by: arjun_arippa
1 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
yhsm-decrypt-aead(1)					      General Commands Manual					      yhsm-decrypt-aead(1)

yhsm-decrypt-aead - Decrypt AEADs (with secrets for YubiKeys) SYNOPSIS
yhsm-decrypt-aead [options] --aes-key KEY file-or-dir [...] DESCRIPTION
Decrypt AEADs generated using a YubiHSM. NOTE that this requires knowledge of the AES key used in the YubiHSM. After a number of YubiKey secrets have been generated using yhsm-generate-keys(1) , this tool can decrypt them and produce a CSV file usable to personalize corresponding YubiKeys. OPTIONS
-v, --verbose Enable verbose operation. --debug Enable debug printout. --format str Select output format (raw or yubikey-csv). --print-filename Prefix any output with the input filename. --key-handle kh Key handle used when generated AEADs, if not stored in the AEAD file (AEAD generated with python-pyhsm 1.0.3 or lower). --aes-key hexstr AES key used to generate the AEADs. EXIT STATUS
0 OK 1 Fail BUGS
Report python-pyhsm/yhsm-decrypt-aead bugs in the issue tracker <> SEE ALSO
The python-pyhsm home page <> YubiHSMs and YubiKeys can be obtained from Yubico <>. python-pyhsm June 2012 yhsm-decrypt-aead(1)

Featured Tech Videos