On Wed, 15 Jun 2005, Buddy Burden wrote:

I can do a "ps -ef|grep PID" and then subtract 2 (one for the grep and one for the parent PID). But that isn't a good solution in my opinion.

Nope, not very efficient, I wouldn't say.  How about this?

        ps -eo ppid= | grep PID | wc -l

Don't forget that the PID in question is that of the SCREEN process and not the screen process.

But it doesn't help you much on a general basis, as a screen usually gets a bit fragmentet in its numbering of windows after a while. you may have N windows, but there is a big chance that they are not numbered 1 to N.

--
  Peder Stray


_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to