>>>>> Gros Bedo <[EMAIL PROTECTED]> (GB) wrote: >GB> Yes I've seen that each python script calls its own instance of >GB> Python. But how to know which is the good one in bash ? Is there a >GB> command that gets the parameters of process, so I could use grep to >GB> select the one containing the name of my script ?
The ps command will usually give you a list of the running processes with their argument, but using that is suboptimal. I suppose you start the process in the background, like: python myscript &. When you start the python script in bash (or any other process for that matter) in the background you can get the process id (pid) with $! (immediately after starting the process). Later on you can use this to kill the process: python myscript myargs & savepid=$! later: kill $savepid That is much better than trying to grep through the ps output. -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list