Unix/Linux Go Back    

Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Python script not working in batch process


Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-17-2013   -   Original Discussion by mhahe
mhahe mhahe is offline
Registered User
Join Date: Mar 2013
Last Activity: 13 May 2013, 5:10 AM EDT
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Python script not working in batch process

Good morning, I have a python 2.3 script that runs stand alone as intended when tested, then it was put into a ksh script. when running the ksh script it runs as intended. The problem is that my script does not run when the ksh script is called by another user who runs a batch process (as of right now I do not know the specifics of this batch process) which calls the ksh script, which should call my python script. I have tried changing owner ship of my python script to the user that will be running the batch script and also gave 777 permissions to the script in hopes that would help. I am new to unix and python altogether so any input would be much appreciated. In case the internals of my script are relevant, my script does:
1. checks a directory for files
2. goes through these files and checks for a certain pattern and counts hits
3. create a file that saves the name of the file that contains matches to this pattern and how many hits were found
4. FTP the created file and all files containing hits to another machine.

my script uses an external command 'openssl' for decrypting the other machines login info.

Thanks in advance.
Sponsored Links
Old Unix and Linux 03-26-2013   -   Original Discussion by mhahe
DGPickett DGPickett is offline Forum Advisor  
Registered User
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 587 Times in 560 Posts
  • Batch processes suggest that there might not be any controlling terminal, which throws some commands off, for instance, some sorts of ps calls: Man Page for ps (opensolaris Section 1) - The UNIX and Linux Forums
  • Parts of openssl can be very sensitive to file permissions and ownership, where other users have not got the same, functional .ssh* directory.
  • Another user suggests the environment is not compatible, and you may need to embed some environment setting code into your app to make it robust. Python may have additional environmental support needs.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
My Script For Process Checking is NOT Working rymnd_12345 Shell Programming and Scripting 8 04-24-2012 10:34 AM
Script in python to kill process by date doudoubens Shell Programming and Scripting 0 04-11-2012 06:46 PM
Executing a batch of files within a shell script with option to refire the individual files in batch goddevil Shell Programming and Scripting 2 01-09-2012 03:51 PM
User Prompt during batch script process bond007jlv Shell Programming and Scripting 2 11-30-2006 03:12 PM

All times are GMT -4. The time now is 11:43 AM.