Usually I am satisfied by the commandline tools available in OSX. However, one itch that has been unfulfilled for quite a while since my permanent conversion to the Mac is the lack of “pgrep” and “pkill”, two of my favorite time savers from Linux.
Solution
sourceforge.net/projects/proctools/
Works like a dream.
[tags]osx,utilities[/tags]
No related posts.
There’s killall instead of Pkill, but it only matches the process name from the beginning (not as substring)
So when you ran “bash -x myscript”, then the following will not terminate it : killall myscript
Of course, “killall bash” may not be a very wise thing to do
Thanks for the tip !
thanks for the suggestion!
used “sudo port install proctools” to install. Now i can do “sudo dtruss -p $(pgrep foo)” !
Or, if you can’t be bothered to compile proctools, emulate using the existing on-board tools. See: http://soziotechnischemassnahmen.blogspot.com/2010/03/poor-mans-pgrep-on-mac-os-x.html