Re: (hopefully) simple perl question...

2000-02-29 Thread Keith G. Murphy
Jonathan Lupa wrote: > > Is there a built in command, or shell command to retrieve the process > name from a pid? > > The best I could come up with is slurping the stuff from /proc/cmdline > or something like ps|cut, but it seems to me there is probably a > better way I am ignorant of. > I wonde

Re: (hopefully) simple perl question...

2000-02-29 Thread Jonathan Lupa
On Tue, Feb 29, 2000 at 03:42:20AM +, Colin Watson wrote: > [EMAIL PROTECTED] (William T Wilson) wrote: > >ps ax | awk '$1 == {print $5}' > > Or indeed 'ps -o%c h -p '. Thanks guys! :) -- [EMAIL PROTECTED] GPG public key available from http://www.jamdata.net/~jjlupa/gpg.asc pgp5px2HKSc

Re: (hopefully) simple perl question...

2000-02-29 Thread Colin Watson
[EMAIL PROTECTED] (William T Wilson) wrote: >On Mon, 28 Feb 2000, Jonathan Lupa wrote: >> Is there a built in command, or shell command to retrieve the process >> name from a pid? > >ps ax | awk '$1 == {print $5}' Or indeed 'ps -o%c h -p '. This will probably break on other Unices (and older vers

Re: (hopefully) simple perl question...

2000-02-29 Thread William T Wilson
On Mon, 28 Feb 2000, Jonathan Lupa wrote: > Is there a built in command, or shell command to retrieve the process > name from a pid? ps ax | awk '$1 == {print $5}' There's no builtin command to do this. I don't know if Perl can do it or not. I doubt it, though. > The best I could come up wit