how can I find out the process ids with a process name

Michael Bentley michael at jedimindworks.com
Sun Sep 2 22:32:54 CEST 2007


>
> cd /proc
> for i in ls [0-9]*/status
> do
>      echo $i `grep '^Name' $i | cut -f2` | sed 's/\/status//g'
> done
>


Um...

cd /proc
for i in `ls [0-9]*/status`
do
     echo $i `grep '^Name' $i | cut -f2` | sed 's/\/status//g'
done


---
Let the wookie win.






More information about the Python-list mailing list