Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Unable to call a python script from bash Post 302770178 by maddy26615 on Thursday 14th of February 2013 04:11:30 PM
Old 02-14-2013
[Solved] Unable to call a python script from bash

Hi,

I am trying to run a python script embedded in bash script. But is throwing me an error. Please help.

Script:
Code:
#!/bin/bash

nohup /usr/bin/python /opt/web/http.py &

Error:
Code:
/usr/bin/python: can't open file '/opt/web/http.py': [Errno 2] No such file or directory

Please help me on this.

Last edited by Scrutinizer; 02-14-2013 at 05:17 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to call executable from script

Now I am using the HP-UX11.11 version. The scripts are runninh in KSH shell. While I wan to call one executable of any Pro*C file, I have got the following error, however the executable is running fine directly. testpri Started at 10.05.200923:40 /usr/lib/dld.sl: Bad magic number for... (0 Replies)
Discussion started by: priyankak
0 Replies

2. HP-UX

[Solved] Not able to call a script from another programatically

Hi, I need to call a shell script from another. Let me explain you with an example. a1.sh and b1.sh are two scripts. a1.sh calls b1.sh internally. If i run a1.sh manually, it internally calls b1.sh but the problem is There is a process that calls this a1.sh at regular intervals,... (1 Reply)
Discussion started by: hadarapu
1 Replies

3. Shell Programming and Scripting

[solved] using backticks to call bash from perl

Hi all, Here is my code: my $x = `bash -c \" ls -l filename | awk '{print \$5}'\"`; print "$x\n"; This will run the first part of the bash script but not the awk command. It therefore gives output of: -rw-r--r-- 1 root root 13619200 2012-04-25 08:16 filename I am actually trying to... (0 Replies)
Discussion started by: free2rhyme2k
0 Replies

4. Shell Programming and Scripting

Python call to bash script returns empty string

Hi all, I need help figuring out why my script won't work when envoked from web interface. First off, I'm fairly new to Linux and Shell scripting so, my apologies for being ignorant! So I have a python script that I envoke through a web interface. This script envokes my shell script and... (8 Replies)
Discussion started by: arod291
8 Replies

5. UNIX for Advanced & Expert Users

Unable to call a script from another script in cshell

Hi, I am unable to call one script from another script in c shell on windows SUA environment. Please find below code , File1 āTmp.csh: #!/bin/csh setenv PATH "${PATH}:.:$TOP/bin:$TOP/RMBIN/bin:$GP_SUA/:$INTERIX_ROOT" echo "hi1" . /tmp1.csh File2ātmp1.csh ... (6 Replies)
Discussion started by: gthangav
6 Replies

6. Shell Programming and Scripting

[Solved] Unable to mailx new $pid for a script restart

Ill try to make this brief: I am trying to get the script below to run another script defined as BATNAM. The script runs fine, does what i designed it to do, however... I would like it to mailx the NEW $pid that was restarted. This script is supposed to go in crontab as root, and run by... (8 Replies)
Discussion started by: olyanderson
8 Replies

7. UNIX for Advanced & Expert Users

Calling expect from shell script which inturn call python

Hi Team, I have to execute a task from my local machine, where i keep my .expect,.sh, .bash and .python scripts .Task are coded in the script and has to be executed at remote machine. for that i used following task ..... SCRIPT 1: cat shell_check.sh read value if then expect... (3 Replies)
Discussion started by: Sivarajan N
3 Replies

8. Shell Programming and Scripting

Beginner here, how to call a bash-script from python properly?

Hi everyone, i have the following script.sh: foo='lsusb | grep Webcam | cut -c16-18' sudo /home/user/public/usbreset /dev/bus/usb/001/$foo when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
Discussion started by: hilfemir
6 Replies

9. Shell Programming and Scripting

How to use scl enable python command call with in bash shell script?

I have a bash shell script, within it i am using the below two commands . its failing right on scl enable command itself. if i run it by itself without a shell, it works fine. by default it is using pythin version 2.6 something. i want to use 3.4 version for that reason with in the shell... (3 Replies)
Discussion started by: cplusplus1
3 Replies

10. Shell Programming and Scripting

Unable to print python array in shell script loop.

I am unable to loop print a python string array in my unix shell script: ~/readarr.sh '{{ myarr }}' more readarr.sh echo "Parameter 1:"$1 MYARRAY= $1 IFS= MYARRAY=`python <<< "print ' '.join($MYARRAY)"` for a in "$MYARRAY"; do echo "Printing Array: $a" done Can you... (10 Replies)
Discussion started by: mohtashims
10 Replies
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh. Note that /etc/shells overrides the default list. Invalid shells in /etc/shells may cause unexpected behavior (such as being unable to log in by way of ftp(1)). FILES
/etc/shells lists shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.10 4 Jun 2001 shells(4)
All times are GMT -4. The time now is 12:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy