• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Solved--Truly weird, easy to replicate behaviour...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Solved--Truly weird, easy to replicate behaviour... (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: How easy is it to do GUIs in Applescript?
  • Next by Date: Re: Truly weird, easy to replicate behaviour...
  • Previous by thread: Re: Solved--Truly weird, easy to replicate behaviour...
  • Next by thread: Splash screen for 5 seconds
  • Index(es):
    • Date
    • Thread