notilas
notilas

Reputation: 2485

Python run a shell script with ksh environment and setent.sh

I am trying to change a shell scrip to a python script to enable a multiprocessing feature.

The current shell script is

#! /bin/ksh
. /sys/etc/setenv.sh

/my/program.X parameter1 2016-08-01@00:10 2016-08-01@00:20 2 >> /my/data/20160801.log | gzip - > /my/data/20160801.0010.1h.dat.gz 

I have tried to use python subprocess, but cannot figure out the exact way to run this script.

setenv.sh is pretty large and complicated script, I need to run it as is under ksh, then need to run the program.

Upvotes: 1

Views: 300

Answers (0)

Related Questions