Sponsored Content
Top Forums Shell Programming and Scripting Changing shell from a script and running something from the new shell Post 302923028 by Don Cragun on Wednesday 29th of October 2014 11:49:37 PM
Old 10-30-2014
I am not a csh or csh-derivative expert by any stretch of the imagination, but I don't understand why it matters at all which shell invokes python or why anyone would want to invoke a shell to invoke another shell to invoke python???

Why isn't your script just:
Code:
ssh-agent python "hello.py"
exit 0

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Password changing in a Script (shell and expect)

Hi, Does anybody know how to change the password on multiple servers with a script. I have 300 Sun boxes and the password expiry is set to 30 days. Im in a process to build a script using expect. Need a help from an expert who has already done it. Regards, Vinod (1 Reply)
Discussion started by: chellam
1 Replies

2. Shell Programming and Scripting

Changing cursor position using shell script

Hi, Pleae help me on this. Normally, when we say read username, the cursor will come in the first position of next line, but I want the output of the below Normal usage ------------- please enter username: _ I want like the below ---------------------- please enter username: ... (2 Replies)
Discussion started by: balamv
2 Replies

3. Shell Programming and Scripting

How to run cmds after changing to a new env (shell) in a shell script

Hi, I am using HP-UNIX. I have a requirement as below I have to change env twice like: cadenv <env> cadenv <env> ccm start -d /dbpath ccm tar -xvf *.tar ccm rcv .... mv *.tar BACKUP but after I do the first cadenv <env> , I am unable to execute any of the later commands . ... (6 Replies)
Discussion started by: charlei
6 Replies

4. Shell Programming and Scripting

Changing value of a variable inside a shell script

I have a continous polling happening inside a shell script on AIX. This actually calls a PL/SQL block. Is there a way I can set up a variable or pass an interrupt to end the script gracefully. I cant read from the config once the job starts running. Ideally I should change value of a variable and... (1 Reply)
Discussion started by: kshyju
1 Replies

5. Shell Programming and Scripting

Regarding changing shell thru script

Guys can I change the shell thru script, and after changing i want the script to continue on the previous machine. Or please suggest other alternative if any??? #!/bin/ksh HOST=`hostname` echo "Running the script..." for MyServer in `cat ServerNames.txt` do echo "\n Logging onto... (4 Replies)
Discussion started by: sdosanjh
4 Replies

6. UNIX for Dummies Questions & Answers

Changing permissions in a shell script

Hi All, I have a shell script which we keep on changing permissions on a On-Demand Basis-->for e:g--from 400(Read only) to 740(Execute permission) etc. Is there any way by which I can view the history of the script?-->I am interested in finding out the date-time stamps when the script's... (2 Replies)
Discussion started by: DevotedPupil
2 Replies

7. Shell Programming and Scripting

Shell script running command in different shell

Hi All, Is there any way where we can run few commands with different shell in a shell script ? Let's have an example below, My first line in script reads below, #!/bin/sh However due to some limitation of "/bin/sh" shell I wanted to use "/bin/bash" while executing few... (9 Replies)
Discussion started by: gr8_usk
9 Replies

8. Shell Programming and Scripting

Help with shell script on Month Changing Logic

Hi Unix Experts, Happy Morning to all !! :) I am new to UNIX Shell Scripting and at my begineer level. To get acquainted to scripting, I am trying to create a script. The details/requirements of my script was to create a script with month changing logic in it so that on every 6th Working... (3 Replies)
Discussion started by: micky3112
3 Replies

9. Shell Programming and Scripting

Running 3 shell script parallel in another shell script

Hi, I'm trying to do teh below thing. I have a single script which uses 3 different parameters to do 3 different work like belwo. test1.sh par1 -- it shuts down an instance test1.sh par2 -- it shuts down an instance test1.sh par3 -- it shuts down an instance Now I created a script... (7 Replies)
Discussion started by: bhaski2012
7 Replies

10. Shell Programming and Scripting

Cp not working in shell script but running perfectly from shell

Dear All, I have script. Dest="" IFS=' ' for translation in $(echo $MY_MAP) do t1=$(echo $translation | cut -d"=" -f1) t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1) if then Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2 break; ... (4 Replies)
Discussion started by: yadavricky
4 Replies
lp-shell(1)						      General Commands Manual						       lp-shell(1)

NAME
lp-shell - Open an interactive launchpadlib shell. SYNOPSIS
lp-shell [-a] [-cPROGRAM] [--python] [--ipython] [service] [LP API version] DESCRIPTION
lp-shell opens an interactive Python shell with a launchpadlib.Launchpad object "lp" which is ready for use. It authenticates against Launchpad with the consumer name "udt-lp-shell". When using lp-shell with the -a option it will use the anonymous login from launchpadlib.Launchpad. By default lp-shell connects to the "production" Launchpad service using the "1.0" LP API version. If you want to connect to another Launchpad service, call lp-shell with the service name as the second argument. lp-shell supports all ser- vices known by launchpadlib Python module. Currently known are (list can be incomplete or outdated): "production", "staging", "dogfood". A different LP API version can be selected by passing the API version to use as the third argument. Current supported are: "beta", "1.0" and "devel". OPTIONS
-a Login anonymously into Launchpad. -c PROGRAM Don't enter a shell but only run the specified Python program and exit. --ipython Use an ipython shell if available (default). --python Use a regular python shell. AUTHORS
lp-shell was written by Martin Pitt <martin.pitt@ubuntu.com>. It is released under the terms of the GNU General Public License, version 2 or (at your option) any later version. lptools 27 March 2010 lp-shell(1)
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy