Excellent. Thanks, Chris.
On Jul 9, 2007, at 4:06 PM, chris bohnert wrote:
killall ProcessName should do what you want
--
cb
On 7/9/07, Chris Sheffield [EMAIL PROTECTED] wrote:
My Unix scripting knowledge leaves a bit to be desired, so I thought
I'd ask here for some help.
I have a Vise
Well, Ken. It turns out I think I need to go with your method. The
'killall' command is definitely more concise, but it turns out that I
am going to have to do a partial search on the path to the process
exe just to make sure I get the right one, and killall doesn't seem
to allow that.
Okay, I think I figured out the problem.
The pid as returned from ps has a different number of leading spaces
depending on the number of digits in the pid. So using a set value
for the -f option doesn't seem to work. For example, if the pid has
four digits, using 2 works since the pid has
Chris,
Try this:
ps -awx | awk '{print $2}'
if that prints you a list of pid's you should be good to replace the cut
pipe with the awk command. By the way, what version of os X are you
running..mine doesn't seem to behave as you describe.
--
cb
On 7/10/07, Chris Sheffield [EMAIL PROTECTED]
On Tue, 10 Jul 2007 09:28:01 -0600, Chris Sheffield wrote:
I've got another question for you though. It concerns the 'cut -d\
-f2' part of this. This doesn't seem to be working correctly. Can you
explain more what's supposed to happen here?
Yes, the cut basically extracts a delimited
On Tue, 10 Jul 2007 10:55:14 -0600, chris bohnert wrote:
Chris,
Try this:
ps -awx | awk '{print $2}'
if that prints you a list of pid's you should be good to replace the cut
pipe with the awk command. By the way, what version of os X are you
running..mine doesn't seem to behave as
Excellent. That seems to work just fine. Although I had to change the
2 to 1, since the pid is the first column returned.
I'm running 10.4.10. What's different on yours?
On Jul 10, 2007, at 10:55 AM, chris bohnert wrote:
Chris,
Try this:
ps -awx | awk '{print $2}'
if that prints you a
Tried this. All parts seem to work except now I'm getting an
operation not permitted error from the kill command. I'm running it
with sudo, so I don't understand why this would happen. But I did
verify that the correct pid is now getting returned. In fact, the
entire error message reads,
My Unix scripting knowledge leaves a bit to be desired, so I thought
I'd ask here for some help.
I have a Vise installer for OS X that needs to check for and kill our
own process if it's running. The installer will be authenticated when
running. I need a shell script that I can execute
On Mon, 9 Jul 2007 14:46:32 -0600, Chris Sheffield wrote:
My Unix scripting knowledge leaves a bit to be desired, so I thought
I'd ask here for some help.
I have a Vise installer for OS X that needs to check for and kill our
own process if it's running. The installer will be authenticated
killall ProcessName should do what you want
--
cb
On 7/9/07, Chris Sheffield [EMAIL PROTECTED] wrote:
My Unix scripting knowledge leaves a bit to be desired, so I thought
I'd ask here for some help.
I have a Vise installer for OS X that needs to check for and kill our
own process if it's
On Mon, 9 Jul 2007 17:06:23 -0500, chris bohnert wrote:
killall ProcessName should do what you want
Oh, man! I could have been doing it the EASY way...
:-D
Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
12 matches
Mail list logo