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

(hopefully) simple perl question...

2000-02-29 Thread Jonathan Lupa
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. Thanks! Jonathan -- [EMAIL PROTECTED] GPG p

RE: simple perl question

1998-07-18 Thread Jeff Schreiber
dave oswald <[EMAIL PROTECTED]> writes: > > Normally I would consult with my reference books but am not able to > get to them. Or you could just try it! :) >I thought maybe something like: > >$CurrentTime=exec`date "+%D %T"`; >print $CurrentTime; > % perl -e '$CurrentTime = `date "+%D

Re: simple perl question

1998-07-18 Thread aqy6633
> I thought maybe something like: > > $CurrentTime=exec`date "+%D %T"`; > print $CurrentTime; > $CurrentTime=localtime(time); Alex Y. -- _ _( )_ ( (o___ +---+ | _ 7 |Alexander Yukhimets| \(

simple perl question

1998-07-18 Thread dave oswald
In a perl script i need to load a variable ($CurrentTime) with the systems current time. Normally I would consult with my reference books but am not able to get to them. I find myself using them when I need to work in perl which is not very often... I'm looking for time_stamp something like "07/17/