Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 18 Oct 2000 23:51:26 -0400 From: Christopher Faylor To: cygwin AT sources DOT redhat DOT com Subject: Re: ps output format Message-ID: <20001018235126.A17066@cygnus.com> Reply-To: cygwin AT sources DOT redhat DOT com Mail-Followup-To: cygwin AT sources DOT redhat DOT com References: <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20001018221146 DOT 00c6f190 AT pop DOT bresnanlink DOT net> <5206-Wed18Oct2000223844+0100-starksb AT ebi DOT ac DOT uk> <2443-Wed11Oct2000213946+0100-starksb AT ebi DOT ac DOT uk> <20001011164208 DOT A13281 AT cygnus DOT com> <5206-Wed18Oct2000223844+0100-starksb AT ebi DOT ac DOT uk> <20001018225426 DOT B15652 AT cygnus DOT com> <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20001018221146 DOT 00c6f190 AT pop DOT bresnanlink DOT net> <20001018232320 DOT D15926 AT cygnus DOT com> <4 DOT 3 DOT 2 DOT 7 DOT 0 DOT 20001018223411 DOT 00c75c50 AT pop DOT bresnanlink DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <4.3.2.7.0.20001018223411.00c75c50@pop.bresnanlink.net>; from cabbey@chartermi.net on Wed, Oct 18, 2000 at 10:45:58PM -0500 On Wed, Oct 18, 2000 at 10:45:58PM -0500, Chris Abbey wrote: >At 23:23 10/18/00 -0400, Christopher Faylor wrote: >>I don't see much difficulty in parsing the output now, actually. > >true, once you know what you're doing... I've seen a lot of people >write scripts that would have choked on that output you had above, >simply because they saw formatted output and started making assumptions, >where as if they'd seen colon separated values.. well cut -d ':' would >become a much more heavily used script construct. Often picking up those >scripts and moving them between *nix platforms has been a royal pain >in the past, not only do you have to deal with the myriad of conflicting >command line options, and the different ordering, but also that sometimes >a field is 4 chars, and others it could be 10. This could *all* be solved >if there was ONE switch across all ps implementations that output a simple >csv style out put that could be accessed with a simple hlookup style of >argument. ok, so I'm off in left field smoking crack and picking daises... It's not a bad idea, but I doubt that anyone would adopt Cygwin's convention if we adopted one. :-) Our insight debugger product goes to great lengths to attempt to parse ps output on various platforms and of course it breaks every time there is a new OS upgrade. Cygwin's PS output is really easily parsable using awk, I think -- except for the date. The date/time field is where there are always problems. If you are aware of an existing ps implementation that does this, though, I wouldn't mind a patch to have ps emulate it. The ps code is really pretty simple so it should not be hard to modify. cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com