On Wed, 2007-12-26 at 16:02 +0200, Tom Rosenfeld wrote: > I have not tested this extensively, but you could try: > pgrep ssh |tail -1 > > This will give you the PID of that last ssh process
they way I read it it will give me the PID of the ssh with the highest process id, which may not be the last. pgrep -n ssh OTOH will give me the pid of the most recently started ssh process which is what I need, but it looks like there will be a race condition here. Maybe I could filter on "session id" or "process group id" if I would know how to set it. -- Oded ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]