Shell to python


 
Thread Tools Search this Thread
Top Forums Programming Shell to python
# 1  
Old 05-14-2015
Shell to python

Hi Guys,

I usually work on Shell script but now i am stuck with python as i am new to it.

Here i have a shell script to start automation on Jenkins using maven and testng framework, please help me to put it in to python script.


Code:
source /opt/storageos/cli/viprcli.profile
mvn clean
mvn test


mvn clean and mvn test starts automation.

-Ashish
# 2  
Old 05-14-2015
/http://stackoverflow.com/questions/89228/calling-an-external-command-in-python
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Feed python with read line in shell

Hello, I am running under ubuntu 14.04. I have a python file bringing requested data. When I run, it asks me to enter query info. After that, it gives the data if anything matched can be found. What I need to accomplish is, instead of entering the requested data from keyboard, to put all... (11 Replies)
Discussion started by: baris35
11 Replies

2. Shell Programming and Scripting

Shell script inputs to python

Hi I am trying to pass 2 input parameters from shell script to python API end point ,but not passing what i expected when print those inputs .Please advise data.txt " 7554317" ,xx5e1 " 7554317" ,xx96 " 7554317" ,xxd6 " 554317" ,xde cat $sites/data.txt |sort |uniq >$sites/a.txt... (5 Replies)
Discussion started by: akil
5 Replies

3. Shell Programming and Scripting

Python/Perl/Shell ??

Hi All, I'm confused what to use (Python/Perl/Shell), I have a scenario here wherein i need to process a data which might have millions of records in tabular format, my task is to find the {0,null,NA} in each and every column and also inform the end user that this column has this many values... (2 Replies)
Discussion started by: nikhil jain
2 Replies

4. Programming

Regarding Python Program with Shell Script

Hi All, I have written a shell script which is using the expect method, it is working fine in terminal window, and then I have executed via python script its also working fine in command prompt functioning properly, I used subprocess.Popen method to execute the shell script file, its working... (0 Replies)
Discussion started by: janaefx
0 Replies

5. Shell Programming and Scripting

How to skip the first line of the script in shell using python?

How to skip first line of the script in shell, using python. (3 Replies)
Discussion started by: KarthikPS
3 Replies

6. UNIX for Dummies Questions & Answers

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... (0 Replies)
Discussion started by: KarthikPS
0 Replies

7. 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

8. 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

9. 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

10. Programming

Writing a shell in Python

Hi all, For one of my projects I'm required to write a python shell which takes in the usual shell commands such as changing directory, clearing the screen and quitting the shell. I've found plenty of resources on doing it in C, but nothing on Python yet. Could anyone point me in the right... (1 Reply)
Discussion started by: sadistik_exec
1 Replies
Login or Register to Ask a Question