Re: Solved--Truly weird, easy to replicate behaviour...
Re: Solved--Truly weird, easy to replicate behaviour...
- Subject: Re: Solved--Truly weird, easy to replicate behaviour...
- From: Emmanuel <email@hidden>
- Date: Sat, 29 Mar 2003 16:47:47 +0100
At 10:15 PM -0500 28/03/03, Deivy Petrescu wrote:
When one types:
ps -aux | grep ...
one spawns a process, namely the grep process, so it should always
return something, unless apparently, if the
process name is more than 8 characters long!
Why 8 characters, now, this beats me!!!
Look at my killer handler:
---------------------------
on KillProcess(theProcess)
if theProcess's length > 16 then set theProcess to text 1
thru 16 of theProcess
try
do shell script (find text "^[[:space:]]*([0-9]+).*"
& theProcess & "$" in (do shell script "ps -wxc") using "kill \\1"
with regexp and string result)
0
on error
error (theProcess & " was not launched")
end try
end KillProcess
---------------------------
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.