Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20050728005142.97092.qmail@web31405.mail.mud.yahoo.com> Date: Wed, 27 Jul 2005 17:51:42 -0700 (PDT) From: Don Beusee Subject: RE: ps -p To: "'Carlo Florendo'" Cc: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit That's not good enough for scripting. First of all, the command is not so simple (you have to grep -v grep also - so that the same script works on Unix systems) and if you have small PID number like 14, that will likely return lots of other processes (like 114, etc). Also, the same appears in the PPID column if it has children. Some Unix variants might not have a space in the ps output between the PID and previous or next column when one of the column's data is larger than the specified printf format. So your command is not reliable enough for scripting and is also very slow on large Unix systems with 1000's of processes running. ps -p is immediate, reliable, and portable (it's SYSV/SVR4 standard). -Don > -----Original Message----- > From: Carlo Florendo [mailto:list-subscriber AT hq DOT astra DOT ph] > Sent: Wednesday, July 27, 2005 5:22 PM > To: Don Beusee > Cc: cygwin AT cygwin DOT com > Subject: Re: ps -p > > Don Beusee wrote: > > >Can you add the -p option? All flavors of Unix these > days allows > >you to specify which PID to ps. > > > > > > ps | grep > > -- > Carlo Florendo > Astra Philippines Inc. > www.astra.ph > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/